File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -28,22 +28,22 @@ public void OnException(ExceptionContext context)
2828 apiResponse . StatusCode = ( int ) HttpStatusCode . InternalServerError ;
2929 break ;
3030
31- case ApiException apiException :
32- apiResponse . Message = apiException . Message ;
33- apiResponse . StatusCode = ( int ) apiException . StatusCode ;
31+ case ApiException ex :
32+ // TODO: Not persistent: "Exception of type 'Initium.Exceptions.ApiException' was thrown."
33+ apiResponse . Message = ex . Message ;
34+ apiResponse . StatusCode = ( int ) ex . StatusCode ;
3435 break ;
3536
36- case NotImplementedException notImplementedException :
37- apiResponse . Message = notImplementedException . Message ;
37+ case NotImplementedException ex :
38+ apiResponse . Message = ex . Message ;
3839 apiResponse . StatusCode = ( int ) HttpStatusCode . NotImplemented ;
3940 break ;
4041 }
4142
43+ context . ExceptionHandled = true ;
4244 context . Result = new JsonResult ( apiResponse )
4345 {
4446 StatusCode = apiResponse . StatusCode
4547 } ;
46-
47- context . ExceptionHandled = true ;
4848 }
4949}
You can’t perform that action at this time.
0 commit comments