Exemplo n.º 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
     };
 }
Exemplo n.º 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
     };
 }