fix: correct retryable check in yookassa fetchWithRetry
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user