You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wrapper accommodates the most common use case of sending a JSON response body with a 200 status code. To send custom headers or status codes, you can just omit using the wrapper and return an object in the form
The wrapper is only designed to simplify the common use case and avoid having to manually add in json content type header.
Hope this answers your question. If it doesn't suit your use case or there is a reason you wish to use the wrapper with a custom status code, let me know. I would be happy to add a feature if it makes sense and it will help you.
How to return custom status code w/o using external libraries like fastify-error?
The text was updated successfully, but these errors were encountered: