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
Move createError utility to its own package #2339
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.
LGTM
Code's ok, doc is missing. |
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 checking out fastify-error now
@mcollina @jsumners @Ethan-Arrowood how do you feel about moving in that module our warnings utility as well? |
I'd see it as a separate module. Maybe |
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
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. |
As titled, the idea is to offer a simple and consistent way to plugin author for creating error objects.
The idea started from fastify/under-pressure#54 (comment).
I'm thinking to extract our warnings utility in the same external module as well, so plugin authors could use the same mechanism for emitting warnings.
You can find the extracted module here.
Feedback?
TODO:
Checklist
npm run test
andnpm run benchmark