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

Cross browser handling of retrying on network connection issues #41

Closed
peterj35 opened this issue Feb 8, 2021 · 0 comments · Fixed by #42
Closed

Cross browser handling of retrying on network connection issues #41

peterj35 opened this issue Feb 8, 2021 · 0 comments · Fixed by #42

Comments

@peterj35
Copy link
Contributor

peterj35 commented Feb 8, 2021

Based on this issue, p-retry now can be used to retry based on network errors on Chrome. Nice!

However, as mentioned in the 'slightly relevant ' fetch issue, different browsers have different messages based on the network errors:
Chrome: TypeError: Failed to fetch
Firefox: TypeError: NetworkError when attempting to fetch resource.
Safari: TypeError: The Internet connection appears to be offline.
(source)

Would it be possible to support network errors in Firefox and Safari, and also retry on them -- also happy to put in a PR by referencing https://github.com/sindresorhus/p-retry/pull/38/files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant