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: handle node api-api error gracefully #9255

Merged
merged 4 commits into from
Oct 22, 2018
Merged

fix: handle node api-api error gracefully #9255

merged 4 commits into from
Oct 22, 2018

Conversation

jquense
Copy link
Contributor

@jquense jquense commented Oct 19, 2018

I keep getting weird errors and it was because my gatsby-node.js had issues, but the build was continuing assuming there was a result

@jquense jquense requested a review from a team as a code owner October 19, 2018 17:38
@@ -243,13 +242,8 @@ module.exports = async (api, args = {}, pluginSource) =>
)
})
.catch(err => {
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems like this catch should be for individidual plugin API call and not for Promise.mapSeries. It makes using pluginName a bit weird there (fact that it needs to be declared early) plus maybe it would allow for easier recovery in develop?

Copy link
Contributor

Choose a reason for hiding this comment

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

(and also returning null would actually make sense there)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah probably yes, that's a better option 👍

@pieh pieh merged commit fa8ef4e into master Oct 22, 2018
@pieh pieh deleted the jquense-patch-1 branch October 22, 2018 14:58
@jquense
Copy link
Contributor Author

jquense commented Oct 22, 2018

Thanks! Sorry for the poor formatting I meant to fix it and got pulled away :/

jedrichards pushed a commit to jedrichards/gatsby that referenced this pull request Nov 1, 2018
I keep getting weird errors and it was because my gatsby-node.js had issues, but the build was continuing assuming there was a `result`
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
I keep getting weird errors and it was because my gatsby-node.js had issues, but the build was continuing assuming there was a `result`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants