Skip to content

Commit 0e26df3

Browse files
update undici retry interceptor config
1 parent 14e5b87 commit 0e26df3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/orkes/helpers/resolveFetchFn.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ export const resolveFetchFn = async (
2121
// keepAliveMaxTimeout: 1000 * 60 * 10,
2222
}).compose(
2323
interceptors.retry({
24-
//maxRetries: 3, // Maximum number of retries (default: 5)
25-
//minTimeout: 1000, // Minimum time to wait before retrying (default: 500ms)
26-
//maxTimeout: 60000, // Maximum time to wait before retrying (default: 30000ms)
27-
//timeoutFactor: 2, // Factor to multiply the timeout by for each retry (default: 2)
24+
maxRetries: 10, // Maximum number of retries (default: 5)
25+
minTimeout: 2000, // Minimum time to wait before retrying (default: 500ms)
26+
maxTimeout: 60000, // Maximum time to wait before retrying (default: 30000ms)
27+
timeoutFactor: 2, // Factor to multiply the timeout by for each retry (default: 2)
2828
//retryAfter: true, // Automatically retry if Retry-After header is present (default: true)
2929
methods: ["GET", "PUT", "HEAD", "POST", "DELETE", "PATCH", "OPTIONS"], // HTTP methods to retry (default includes GET, PUT, HEAD, OPTIONS, DELETE)
3030
//statusCodes: [429, 500, 502], // HTTP status codes to retry (default includes 429, 500, 502, 503, 504)
31-
errorCodes: ["ECONNRESET"], // Error codes to retry (default includes common network errors)
31+
errorCodes: ["ECONNRESET", "read ECONNRESET"], // Error codes to retry (default includes common network errors)
3232
})
3333
);
3434

0 commit comments

Comments
 (0)