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