-
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-plugin-mdx): prevent crash when Markdown syntax error #17135
Conversation
Thanks, this seems to work as expected! I'm not sure why we aren't wrapping the whole function in try-catch. cc @gatsbyjs/themes |
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.
Thank you fore finding it and fixing it.
@johno approves so, me too! 👍
Holy buckets, @tureki — 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! |
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! This looks good to me.
Thanks, this seems to work as expected! I'm not sure why we aren't wrapping the whole function in try-catch.
Yeah, good point. I suppose we can roll with this for now and spend some time considering if we want more granular error reporting here in a future PR/issue?
Description
This PR will catch the error from MDX compile. Avoid the develop server crash and show the error message in the browser.
Related Issues
Fixes #16107
Fixes #16502
Before
After