/fastify-problem-details

Primary LanguageTypeScriptMIT LicenseMIT

Fastify-problem details (WIP)

A Fastify library to convert JSON responses to RFC-7807-compliant format. This standardizes HTTP responses and sets Content-Type to application/problem+json

Helpful resources

https://fastify.dev/docs/latest/Reference/TypeScript#creating-a-typescript-fastify-plugin

https://fastify.dev/docs/latest/Reference/Server/#seterrorhandler https://fastify.dev/docs/latest/Reference/Validation-and-Serialization

https://fastify.dev/docs/latest/Reference/Validation-and-Serialization/#schemaerrorformatter

Content of this library

reply.problem() decorator

Global exception handler

I don't know what else

Using Nest.js?

Checkout nest-problem-details.

License

This project is licensed under the MIT License - see the LICENSE file for details