From 2695de741065e9fc349d57d2a5f2e8435d314cc0 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 13 Oct 2024 14:16:46 +0800 Subject: [PATCH] Retry fetch on timed out --- Build/lib/fetch-retry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/lib/fetch-retry.ts b/Build/lib/fetch-retry.ts index fa7219ca..bf549810 100644 --- a/Build/lib/fetch-retry.ts +++ b/Build/lib/fetch-retry.ts @@ -28,7 +28,7 @@ setGlobalDispatcher(agent.compose( interceptors.retry({ maxRetries: 5, minTimeout: 10000, - errorCodes: ['UND_ERR_HEADERS_TIMEOUT', 'ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN', 'ENETUNREACH', 'EHOSTDOWN', 'EHOSTUNREACH', 'EPIPE'] + errorCodes: ['UND_ERR_HEADERS_TIMEOUT', 'ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN', 'ENETUNREACH', 'EHOSTDOWN', 'EHOSTUNREACH', 'EPIPE', 'ETIMEDOUT'] }), interceptors.redirect({ maxRedirections: 5