Open Uzlopak opened 2 years ago
This would be interesting. It might be too late for Fastify v4 but would you like to assemble a PR anyway?
Is fastify-error the right place? Or should it be done in a different place?
It should be done both here and in Fastify
Reopening for #119
How about we ads a new factory for RFC7807 errors?
How about we ads a new factory for RFC7807 errors?
Seems like a good solution.
Prerequisites
🚀 Feature Proposal
We could implement a toRFC7807-method, which creates RFC7807-compatible JSON Response to FastifyError and use it in fastify 4 by default.
So we could create a new Error like this
and then the resulting JSON would be:
Motivation
No response
Example
No response