public override void OnException(HttpActionExecutedContext actionExecutedContext) { SkyExceptionError error = new SkyExceptionError(actionExecutedContext.Exception); actionExecutedContext.Response = actionExecutedContext.Request.CreateResponse(HttpStatusCode.OK, error); }
public override void Handle(ExceptionHandlerContext context) { SkyExceptionError error = new SkyExceptionError(context.Exception); context.Result = new ResponseMessageResult(context.Request.CreateResponse(HttpStatusCode.OK, error)); }