Browse Source

Retry fetch on timed out

SukkaW 1 year ago
parent
commit
2695de7410
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Build/lib/fetch-retry.ts

+ 1 - 1
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