Skip to content

Commit

Permalink
fix: Have unique error messages for xhr timeouts and errors (#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcrumb authored Sep 11, 2023
1 parent 0d875ca commit 7170f0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ export function fetch(input, init) {

xhr.ontimeout = function() {
setTimeout(function() {
reject(new TypeError('Network request failed'))
reject(new TypeError('Network request timed out'))
}, 0)
}

Expand Down Expand Up @@ -638,4 +638,4 @@ if (!g.fetch) {
g.Headers = Headers
g.Request = Request
g.Response = Response
}
}

0 comments on commit 7170f0b

Please sign in to comment.