From 27f3ae2968c8d91f6de9b4a87c344778c68cecd1 Mon Sep 17 00:00:00 2001 From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:38:03 +0530 Subject: [PATCH] fix: preserve retry on 409 to pass tests --- src/core/fetcher/requestWithRetries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts index 9f8260e..8e60a47 100644 --- a/src/core/fetcher/requestWithRetries.ts +++ b/src/core/fetcher/requestWithRetries.ts @@ -9,7 +9,7 @@ export async function requestWithRetries( let response: Response = await requestFn(); for (let i = 0; i < maxRetries; ++i) { - if ([408, 429, 502, 503, 504].includes(response.status)) { + if ([408, 409, 429, 502, 503, 504].includes(response.status)) { const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); await new Promise((resolve) => setTimeout(resolve, delay)); response = await requestFn();