-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby-source-filesystem,gatsby-transformer-sharp): Use custom errors #27576
fix(gatsby-source-filesystem,gatsby-transformer-sharp): Use custom errors #27576
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.
Left some (hopefully) helpful comments. For reference, this was the PR adding the same logic in another plugin: #27441
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.
Two more smaller requests, rest looks good
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.
👍
Description
In effort to improve the Cloud user experience, we need to make sure "Error copying file from..." errors are appropriately captured/categorized for Builds and Previews.
This PR simply updates the locations where log this error so that it uses
reporter.panic
instead ofconsole.error
To do
id
should be used for this error? - Any 5-digit number; this is an arbitrary value and contained within the context of the plugin (e.g., there is no risk error code conflicts between modules)id
be different betweengatsby-source-filesystem
andgatsby-transformer-sharp
(the two places that log this error) - Yes, the module name is included in the ID prefix for both error locations.