From 7170f0b127d16c5895aba61c9168482834809046 Mon Sep 17 00:00:00 2001 From: Lode Vanhove Date: Mon, 11 Sep 2023 12:33:12 +0200 Subject: [PATCH] fix: Have unique error messages for xhr timeouts and errors (#1380) --- fetch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch.js b/fetch.js index 99360494..5b5c5ffc 100644 --- a/fetch.js +++ b/fetch.js @@ -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) } @@ -638,4 +638,4 @@ if (!g.fetch) { g.Headers = Headers g.Request = Request g.Response = Response -} \ No newline at end of file +}