Skip to content

Commit

Permalink
Support cross-fetch for retrying on network errors (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianneisler authored and sindresorhus committed Mar 29, 2021
1 parent 43744e4 commit 23e67ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const retry = require('retry');
const networkErrorMsgs = [
'Failed to fetch', // Chrome
'NetworkError when attempting to fetch resource', // Firefox
'The Internet connection appears to be offline' // Safari
'The Internet connection appears to be offline', // Safari
'Network request failed' // `cross-fetch`
];

class AbortError extends Error {
Expand Down

0 comments on commit 23e67ab

Please sign in to comment.