fix: correct retryable check in yookassa fetchWithRetry

This commit is contained in:
Kirill
2026-05-20 18:04:07 +05:00
parent 3879e4b388
commit a3556367c6
+1 -1
View File
@@ -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
}