แก้ปัญหา GlobalExceptionMiddleware Resturn Response 200 เมื่อมมี Exception 500
This commit is contained in:
parent
70cc95e408
commit
9a2e487d8d
4 changed files with 38 additions and 5 deletions
|
|
@ -74,6 +74,7 @@ namespace BMA.EHR.Domain.Middlewares
|
|||
responseModel.Message = GlobalMessages.ForbiddenAccess;
|
||||
break;
|
||||
default:
|
||||
response.StatusCode = (int)HttpStatusCode.InternalServerError;
|
||||
responseModel.Status = (int)HttpStatusCode.InternalServerError;
|
||||
responseModel.Message = GlobalMessages.ExceptionOccured;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue