New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export error codes #4266
Export error codes #4266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! Can you please add a unit test?
@mcollina Can you please suggest what this unit test should check? I see a lot of checks for error codes in current test cases like: t.equal(err.code, 'FST_ERR_SCH_VALIDATION_BUILD') I can update them to depend on exported t.ok(err instanceof Fastify.errorCodes.FST_ERR_SCH_VALIDATION_BUILD) if it makes sense. I can add new tests but can't find a test case for them since it is just an export. |
I see that not all error codes listed in the documentation. I could add missed ones, but it's hard to provide a meaningful description because I am not familiar with them. |
Add them even with a minimum description! |
Done :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
(something that would be amazing: automate the maintenance of the error codes).
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. |
Handling #3842 and #4250.
Checklist
npm run test
andnpm run benchmark
and the Code of conduct