relay-tools / react-relay-network-layer

ReactRelayNetworkLayer with middlewares and query batching for Relay Classic.
MIT License
277 stars 47 forks source link

fix: Don't throw in addition to rejecting a request #62

Closed golmansax closed 6 years ago

golmansax commented 6 years ago

I'm seeing an unnecessary error thrown because react-relay is chaining a .catch((err) => setTimeout(() => throw err)) onto sendQueries.

Does this package need to throw an error after catching it and calling relayRequest.reject(err)? I saw it was changed in the following commit: https://github.com/relay-tools/react-relay-network-layer/commit/1c0f91b371dc3a1dcea6b3b52e73889455532ad5#diff-9636d8a952e59a775d9229f4e5d9680fR30.

nodkz commented 6 years ago

Thanks a lot! 👍

golmansax commented 6 years ago

Thanks for reviewing!