public override void OnActionExecuted(ActionExecutedContext context) { if (context.Exception != null) { context.Result = new JsonResult(new APIReturn(-1, context.Exception.Message)); } }