fix: throw hooks promise rejection (#2070)#2074
Conversation
|
Would you mind to use our internal error system? https://github.com/fastify/fastify/blob/master/lib/errors.js it will also need a an error code. This PR also need tests, and an update to the docs about the new error code. |
3592375 to
93f140f
Compare
|
with this PR, |
Now it will support only undefined case. Fixed |
93f140f to
93610a2
Compare
93610a2 to
910d3f5
Compare
Done with the changes, added a new error code. |
|
Thanks! |
|
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. |
Fixes: #2070
The reason why the error was not thrown because
Promise.reject()was empty and it didn't have any error likePromise.reject(new Error)so when result.then is called it when tohandleRejectwith error undefined.Checklist
npm run testandnpm run benchmark