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): show stack trace for non-graphql errors #28888

Merged
merged 5 commits into from
Jan 7, 2021
Merged

Conversation

pvdz
Copy link
Contributor

@pvdz pvdz commented Jan 6, 2021

Before this PR the error would be swallowed because it wasn't passed on by packages/gatsby/src/query/error-parser.ts. This would mean that the panicOnBuild would never see the original error and would therefor not be able to print the stack, even if that was desirable. By passing the original error object on, it'll do this once again.

The error is not passed on if it is a graphql error, because the code frame is most likely more relevant here.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 6, 2021
@pvdz pvdz added topic: cli Related to the Gatsby CLI topic: dev tooling type: bug An issue or pull request relating to a bug in Gatsby and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 6, 2021
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

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

👍

@pvdz pvdz merged commit 1769fc3 into master Jan 7, 2021
@pvdz pvdz deleted the error-tracing branch January 7, 2021 11:07
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
* fix(gatsby): show stack trace for non-graphql errors

* If we want to squash more graphql specific errors we should catch them

* one attempt at fixing snapshots

* Drop unused imported type
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 type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants