Collection of tools related to problem management (exceptions) that can be generated by applications.
This library is an ad hoc code customization used in my private/work projects thus avoiding the duplication of repetitive code.
| .NET SDK | Supported |
|---|---|
| 6.0 | Yes |
| 7.0 | No |
| 8.0 | Yes |
A full example is available in the CustomLibrary.ProblemDetails.Sample folder or click here.
Note: For correct operation it is necessary to add services.AddProblemDetails(); and app.UseProblemDetails(); to the Program class or in the Startup class
| Status Codes | Exception |
|---|---|
| 304 | NotModifiedException |
| 400 | BadRequestException |
| 401 | UnauthorizedException |
| 403 | ForbiddenException |
| 404 | NotFoundException |
| 405 | NotAllowedException |
| 406 | NotAcceptableException |
| 408 | RequestTimeoutException |
| 409 | ConflictException |
| 422 | UnprocessableEntityException |
| 500 | InternalServerErrorException |
| 501 | NotImplementedException |
| 502 | BadGatewayException |
| 503 | ServiceUnavailableException |
| 504 | GatewayTimeoutException |
Contributions and/or suggestions are always welcome.