public void OnException(ExceptionContext context) { context.Result = new ObjectResult(ErrorException.From(context.Exception, (int)HttpStatusCode.BadRequest, HttpStatusCode.BadRequest.ToString())) { StatusCode = (int)HttpStatusCode.BadRequest }; }
public void OnException(ExceptionContext context) { context.Result = new ObjectResult(ErrorException.From(context.Exception, (int)HttpStatusCode.InternalServerError, HttpStatusCode.InternalServerError.ToString())) { StatusCode = (int)HttpStatusCode.InternalServerError }; }