Retry fetch on timed out

This commit is contained in:
SukkaW 2024-10-13 14:16:46 +08:00
parent 6a984161a4
commit 2695de7410

View File

@ -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