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

Development proxy throws unhandled exceptions #6771

Closed
Bouncey opened this issue Jul 26, 2018 · 1 comment · Fixed by #9839
Closed

Development proxy throws unhandled exceptions #6771

Bouncey opened this issue Jul 26, 2018 · 1 comment · Fixed by #9839
Labels
status: awaiting author response Additional information has been requested from the author

Comments

@Bouncey
Copy link
Contributor

Bouncey commented Jul 26, 2018

Description

Development proxy request errors cause gatsby to crash due to an unhandled exception.

It would be nice to keep the gatsby develop process alive to test site failover

Steps to reproduce

Any gatsby site with with a development proxy provided in gatsby-config.js.

If the proxy url provided is set to fail (proxy server not running, invalid url), gatsby develop will crash when a request is made to the proxy.

Expected result

Exceptions should be handled and reported to the developer. gatsby develop process remains alive.

Actual result

gatsby develop process exits on an unhandled exception.

Environment

gatsby info --clipboard not available in v1?

File contents (if changed)

Shouldn't be required

gatsby-config.js: N/A
package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A

Notes

I have tried wrapping req.pipe(request(proxiedUrl)).pipe(res) in a try...catch, but the error slips through.

@kakadiadarpan
Copy link
Contributor

@Bouncey can you try upgrading gatsby and dependencies to their latest stable versions? We released version 2 recently, that might solve the issue for you.

(Let us know if it doesn't)

@kakadiadarpan kakadiadarpan added the status: awaiting author response Additional information has been requested from the author label Sep 20, 2018
@pieh pieh closed this as completed in #9839 Nov 9, 2018
pieh pushed a commit that referenced this issue Nov 9, 2018
<!--
  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/
-->
Closes #6771
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this issue Jan 22, 2019
…yjs#9839)

<!--
  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/
-->
Closes gatsbyjs#6771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting author response Additional information has been requested from the author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants