From a3556367c6914cff087674a36825dcfd435523c4 Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 20 May 2026 18:04:07 +0500 Subject: [PATCH] fix: correct retryable check in yookassa fetchWithRetry --- server/src/lib/yookassa.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/lib/yookassa.js b/server/src/lib/yookassa.js index 41ccd93..c5e2b32 100644 --- a/server/src/lib/yookassa.js +++ b/server/src/lib/yookassa.js @@ -30,7 +30,7 @@ async function fetchWithRetry(url, opts, maxRetries = 3) { `YooKassa API error: ${res.status} — ${body.description || body.code || 'unknown'} (${body.parameter || 'n/a'})`, ) } catch (err) { - if (err instanceof Error && err.message.startsWith('YooKassa API error') && !isRetryable(err.message)) throw err + if (err instanceof Error && err.message.startsWith('YooKassa API error')) throw err lastError = err if (attempt === maxRetries) throw lastError }