Some exceptions have special casing for http status codes, however the codes were not being set consistently. AutoWrapperBase has a branch on DisableProblemDetailsException. If true, certain exceptions would get special status codes (ex UnauthorizedAccessException=401) on the response. If false, the status modifier was skipped and responses were sent with a basic 500 code.
This has been resolved. In the future, the logic should be extracted so response codes are guaranteed to be sync'd for ApiProblemDetailsHandler.HandleProblemDetailsAsync and ApiRequestHandler.HandleExceptionAsync
Also added a special exception case NotImplementedException=501. This is helpful for auto-scaffolded APIs
Also fixed a bug that made ShowIsErrorFlagForSuccessfulResponse=true a NOP
Some exceptions have special casing for http status codes, however the codes were not being set consistently.
AutoWrapperBase
has a branch onDisableProblemDetailsException
. If true, certain exceptions would get special status codes (exUnauthorizedAccessException=401
) on the response. If false, the status modifier was skipped and responses were sent with a basic 500 code.This has been resolved. In the future, the logic should be extracted so response codes are guaranteed to be sync'd for
ApiProblemDetailsHandler.HandleProblemDetailsAsync
andApiRequestHandler.HandleExceptionAsync
Also added a special exception case
NotImplementedException=501
. This is helpful for auto-scaffolded APIsAlso fixed a bug that made
ShowIsErrorFlagForSuccessfulResponse=true
a NOP