Fastify error handler supporting Boom errors and generic errors.
Negotiates the response format via @fastify/accepts:
@fastify/accepts
text/html
_error.ejs
@fastify/view
application/json
For Boom errors the HTTP status code and payload come from error.output. For generic errors a 500 is used unless the reply already has a 4xx/5xx status.
error.output
Fastify error handler supporting Boom errors and generic errors.
Negotiates the response format via
@fastify/accepts:text/html— renders_error.ejs(requires@fastify/view).application/json— JSON payload.For Boom errors the HTTP status code and payload come from
error.output. For generic errors a 500 is used unless the reply already has a 4xx/5xx status.