Skip to content

Stratis-OSS/RestExceptions

Repository files navigation

RestExceptions

Extensible Web API middleware that maps all exceptions to standardized RFC7807-compliant HTTP responses.

NuGet Packages

RestExceptions Package NuGet
RestExceptions NuGet

Documentation

You can read the documentation for RestExceptions on GitHub wiki.

Example response format (404)

{
  "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"
}

Examples and sample project

A minimal API utilizing RestExceptions is included in the project files as an example.

Disclaimer

This project was generated using Stratis-Dermanoutsos/dotnet-empty-solution.

About

Extensible Web API middleware that maps all exceptions to standardized RFC7807-compliant HTTP responses.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published