-
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-transformer-remark): properly bubble up errors thrown in subplugins #9972
Conversation
This will cause |
I didn't check if the build will terminate or not, but i dont think that should happen. anyways if |
Can you elaborate what do You mean? I don't think we want to build be succesful if there are any errors. |
@sparshy @pieh
Edit: OK, fixed by using a mock |
Also it was weird that the linting tests were failing due to some markdown files in other packages 🤔 |
You can mock |
Cool, didn't think of that! Updated! |
I've spend some time local testing it and uncovered that catching this in When I added more error handling in
I'll clean up my messy code and push it here - sounds good? |
@pieh That would be awesome! |
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.
Thanks @sparshy and @hexrcs for help here!
Holy buckets, @sparshy — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
…ubplugins (gatsbyjs#9972) This allow `gatsby-remark-*` subplugins to not have special error handling - `gatsby` will properly panic on build, but dev server won't crash anymore <!-- Q. Which branch should I use for my pull request? A. Use `master` branch (probably). Q. Which branch if my change is a bug fix for Gatsby v1? A. In this case, you should use the `v1` branch Q. Which branch if I'm still not sure? A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :) Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2. Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/ -->
This allow
gatsby-remark-*
subplugins to not have special error handling -gatsby
will properly panic on build, but dev server won't crash anymore