Skip to content

Commit

Permalink
Add Undici network error handling (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmichaelo authored Nov 23, 2022
1 parent a2004a7 commit fb5f6f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const networkErrorMsgs = new Set([
'NetworkError when attempting to fetch resource.', // Firefox
'The Internet connection appears to be offline.', // Safari
'Network request failed', // `cross-fetch`
'fetch failed', // Undici (Node.js)
]);

export class AbortError extends Error {
Expand Down

0 comments on commit fb5f6f8

Please sign in to comment.