Extensible Web API middleware that maps all exceptions to standardized RFC7807-compliant HTTP responses.
RestExceptions Package | NuGet |
---|---|
RestExceptions |
You can read the documentation for RestExceptions on GitHub wiki.
{
"type": "https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found",
"title": "Not Found",
"status": 404,
"detail": "Content not found.",
"instance": "/users/12",
"traceId": "00-f3e52009f0966d717f93c9653ed45e26-750dad4218610f7f-00",
"method": "GET",
"requestId": "0HNE94J42PNH8:00000001"
}
A minimal API utilizing RestExceptions is included in the project files as an example.
This project was generated using Stratis-Dermanoutsos/dotnet-empty-solution.