fix: cb is not a function at fallbackErrorHandler#5296
fix: cb is not a function at fallbackErrorHandler#5296DzenDyn wants to merge 2 commits intofastify:mainfrom
Conversation
Signed-off-by: Evgeny Nikiforov <DzenDyn@yandex.ru>
|
Thanks for opening a PR! Can you please add a unit test? |
|
I'm sorry, but I'm afraid I'm not quite sure how to do this. |
|
I'm starting to guess if your error handler is bad set, I couldn't reproduce it easily. TypeError: Cannot read properties of undefined (reading 'bind')
at Object.setErrorHandler (/Users/metcoder/Documents/Workspace/MetCoder/Fastify_Core/fastify.js:847:71)
at Object.<anonymous> (/Users/metcoder/Documents/Workspace/MetCoder/Fastify_Core/playground.js:5:9)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 |
|
Yes, should throw an error when setting the value when starting the webserver and not when the webserver is running. |
|
Closed as it was superseeded by #5317 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This fixes error if cb is not a function at fallbackErrorHandler:

Tests:

Benchmarks:

Cheklist:
npm run testandnpm run benchmark