mirror of https://github.com/openclaw/openclaw.git
refactor(failover): remove dead-code alternatives superseded by bare-402 branch
The newly added `^\s*402\s+\S` branch is a strict superset of both `^\s*402\s+payment required\b` and `^\s*402\s+.*used up your points\b`. Remove the two now-unreachable alternatives to keep RAW_402_MARKER_RE concise. All 105 tests pass. Addresses review comment on #47665.
This commit is contained in:
parent
6578662520
commit
1addb1098e
|
|
@ -270,7 +270,7 @@ const RETRYABLE_402_SCOPED_RESULT_HINTS = [
|
|||
"exhausted",
|
||||
] as const;
|
||||
const RAW_402_MARKER_RE =
|
||||
/["']?(?:status|code)["']?\s*[:=]\s*402\b|\bhttp\s*402\b|\berror(?:\s+code)?\s*[:=]?\s*402\b|\b(?:got|returned|received)\s+(?:a\s+)?402\b|^\s*402\s+payment required\b|^\s*402\s+.*used up your points\b|^\s*402\s+\S/i;
|
||||
/["']?(?:status|code)["']?\s*[:=]\s*402\b|\bhttp\s*402\b|\berror(?:\s+code)?\s*[:=]?\s*402\b|\b(?:got|returned|received)\s+(?:a\s+)?402\b|^\s*402\s+\S/i;
|
||||
const LEADING_402_WRAPPER_RE =
|
||||
/^(?:error[:\s-]+)?(?:(?:http\s*)?402(?:\s+payment required)?|payment required)(?:[:\s-]+|$)/i;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue