diff --git a/docs/Reference/Errors.md b/docs/Reference/Errors.md index 695c3ed171..f925490ec5 100644 --- a/docs/Reference/Errors.md +++ b/docs/Reference/Errors.md @@ -112,6 +112,9 @@ fastify.setErrorHandler(function (error, request, reply) { this.log.error(error) // Send error response reply.status(500).send({ ok: false }) + } else { + // fastify will use parent error handler to handle this + reply.send(error) } }) @@ -382,4 +385,4 @@ Impossible to load plugin because the parent (mapped directly from `avvio`) #### FST_ERR_PLUGIN_TIMEOUT -Plugin did not start in time. Default timeout (in millis): `10000` \ No newline at end of file +Plugin did not start in time. Default timeout (in millis): `10000`