Prerequisites
Fastify version
4.25.1
Plugin version
No response
Node.js version
21.2.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14
Description
With the following setup:
- errorHandler (outer)
- register plugin:
- errorHandler that throws (inner)
- hook that throws
When the hook executes, the server crashes.
Steps to Reproduce
https://github.com/domdomegg/fastify-crash-mre
Expected Behavior
The server calls the hook, then the inner errorHandler, then the errorHandler.
However, it actually calls the hook, then the inner errorHandler, then crashes.