fix: return exception message if controller exception
This commit is contained in:
parent
07111b9b61
commit
61a11ea223
@ -65,6 +65,7 @@ public class CustomExceptionHandlerMiddleware(RequestDelegate next, ILogger<Cust
|
||||
problemDetails.Status = StatusCodes.Status400BadRequest;
|
||||
problemDetails.Type = "https://tools.ietf.org/html/rfc9110#section-15.5.1";
|
||||
problemDetails.Title = "Invalid arguments provided.";
|
||||
problemDetails.Detail = exception.Message;
|
||||
break;
|
||||
case SecurityException:
|
||||
problemDetails.Status = StatusCodes.Status401Unauthorized;
|
||||
|
Loading…
x
Reference in New Issue
Block a user