Skip to content
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-cli): Fine-grained errors with type/category #37070

Merged
merged 12 commits into from Nov 22, 2022

Conversation

LekoArts
Copy link
Contributor

Description

Forces the existence of type and category on our internal errorMap. Makes the type more fine-grained.

Documentation

No public API changes, so no docs changes needed.

Related Issues

[ch58451]
[ch58452]

@LekoArts LekoArts changed the title fix(gatsby,gatsby-cli): Fine-grained errors with type/category fix(gatsby-cli): Fine-grained errors with type/category Nov 21, 2022
Comment on lines 25 to 26
type: `UNKNOWN`,
level: `ERROR`,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since both are optional for plugins (current behavior) but required internally, we're setting default values here

@LekoArts LekoArts added the topic: cli Related to the Gatsby CLI label Nov 22, 2022
Comment on lines -83 to +92
type: Type.WEBPACK,
// TODO: The type needs to be better
type: Type.UNKNOWN,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because the error could be for bunch of different webpack stages and because of that we can't assign type here? For the follow up we would create specific code ids for each stage then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. We'd need to make type also optionally accept the context so that we can for each stage have an error

@LekoArts LekoArts merged commit 0c2b51c into master Nov 22, 2022
@LekoArts LekoArts deleted the error-map-improvements branch November 22, 2022 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cli Related to the Gatsby CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants