apollo-client: Possible Unhandled Promise Rejection
Apollo 1.0.0-rc.4. React Native 0.42.3
I have some query:
client.query({
query: SOME_QUERY,
options: {
fetchPolicy: 'network-only',
},
variables: { ... },
}).then(result => {
}).catch(error => {
console.log(error)
});
And when I turn off my internet connection I am getting this error message: Possible Unhandled Promise Rejection (id: 0):Network error: Network request failed
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (8 by maintainers)
Commits related to this issue
- Swallow promise on refetch Fixes #3631 Relates to #1449 Same was done for `startQuery` in #1452 — committed to danilobuerger/apollo-client by danilobuerger 6 years ago
@helfer please reopen this issue. I am getting this error again but now with refetch function. My code
I see my profile, switch off my internet connection and make refetch then I am see Network Error at props.error. This is fine I can handle errors but I think query is still running and after query timeout I got the same error as above.
For everyone seeing this in refetch, see #3631
If it doesn’t work, a reproduction with https://github.com/apollographql/react-apollo-error-template would be much appreciated.