relay-tools / react-relay-network-modern-ssr

SSR middleware for react-relay-network-modern
https://github.com/relay-tools/react-relay-network-modern-ssr
MIT License
67 stars 10 forks source link

Catch fetch errors #11

Closed kane-c closed 5 years ago

kane-c commented 5 years ago

If the fetch fails (e.g. due to hostname resolution failure), the promise is not rejected until the 30 second timeout.

Wrapping this in a try/catch allows the promise to be rejected instantly.

nodkz commented 5 years ago

Good catch! Thanks!

nodkz commented 5 years ago

:tada: This PR is included in version 1.2.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

alloy commented 5 years ago

Thanks @kane-c 🙌