Skip to content

Commit 7170f0b

Browse files
authoredSep 11, 2023
fix: Have unique error messages for xhr timeouts and errors (#1380)
1 parent 0d875ca commit 7170f0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎fetch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ export function fetch(input, init) {
563563

564564
xhr.ontimeout = function() {
565565
setTimeout(function() {
566-
reject(new TypeError('Network request failed'))
566+
reject(new TypeError('Network request timed out'))
567567
}, 0)
568568
}
569569

@@ -638,4 +638,4 @@ if (!g.fetch) {
638638
g.Headers = Headers
639639
g.Request = Request
640640
g.Response = Response
641-
}
641+
}

0 commit comments

Comments
 (0)
Please sign in to comment.