fix(runtime-fallback): rename misleading test to match actual behavior

The test name claimed it exercised RETRYABLE_ERROR_PATTERNS directly,
but classifyErrorType actually matches 'payment required' via the
quota_exceeded path first. Rename to 'detects payment required errors
as retryable' to accurately describe end-to-end behavior.
This commit is contained in:
MoerAI
2026-03-25 16:58:49 +09:00
parent f16d55ad95
commit 44fb114370
@@ -250,11 +250,11 @@ describe("quota error detection (fixes #2747)", () => {
expect(errorType).toBe("quota_exceeded")
})
test("matches payment required pattern directly via RETRYABLE_ERROR_PATTERNS", () => {
//#given — message has no quota keyword, only "payment required"
test("detects payment required errors as retryable", () => {
//#given
const error = { message: "Error 402: payment required for this request" }
//#when — classifyErrorType will NOT match (no quota keyword), so isRetryableError must use RETRYABLE_ERROR_PATTERNS
//#when
const errorType = classifyErrorType(error)
const retryable = isRetryableError(error, [429, 503])