Val Alexander
b3b148bba1
fix: narrow 402 rate-limit matcher to prevent billing misclassification
...
The original implementation used isRateLimitErrorMessage(), which matches
phrases like 'quota exceeded' that legitimately appear in billing errors.
This commit replaces it with a narrow, 402-specific matcher that requires
BOTH retry language (try again/retry/temporary/cooldown) AND limit
terminology (usage limit/rate limit/organization usage).
Prevents misclassification of errors like:
'HTTP 402: exceeded quota, please add credits' -> billing (not rate_limit)
Added regression test for the ambiguous case.
2026-03-06 03:36:11 -06:00
..
2026-03-05 09:38:12 +01:00
2026-03-06 03:36:11 -06:00
2026-03-05 11:52:23 -08:00
2026-03-05 12:53:56 -06:00
2026-03-03 02:53:13 +00:00
2026-03-04 11:36:14 -05:00
2026-03-05 12:53:56 -06:00
2026-03-05 12:53:56 -06:00
2026-03-05 13:39:25 -08:00
2026-03-05 07:37:37 -06:00
2026-03-04 11:54:03 -08:00
2026-03-05 09:38:12 +01:00
2026-03-05 12:53:56 -06:00
2026-03-03 01:06:00 +00:00
2026-03-05 09:38:12 +01:00
2026-03-03 00:54:33 +00:00
2026-03-05 07:56:14 +05:30
2026-03-04 00:20:44 -06:00
2026-03-03 20:14:41 -05:00
2026-03-03 00:15:14 +00:00
2026-03-03 13:35:46 -08:00
2026-03-03 21:27:14 -05:00
2026-03-05 13:39:25 -08:00
2026-03-04 11:30:33 -05:00
2026-03-05 12:53:56 -06:00
2026-03-05 20:14:57 +05:30
2026-03-05 13:06:59 -05:00
2026-03-02 19:57:33 +00:00
2026-03-03 00:15:00 +00:00
2026-03-05 09:38:12 +01:00
2026-03-03 03:34:51 +00:00
2026-03-05 12:53:56 -06:00
2026-03-05 12:53:56 -06:00
2026-03-03 01:37:56 +00:00
2026-03-05 13:06:59 -05:00
2026-03-04 00:20:44 -06:00
2026-03-04 08:44:07 -05:00
2026-03-05 09:38:12 +01:00
2026-03-02 20:05:12 -05:00
2026-02-22 18:37:25 +00:00
2026-03-03 22:00:15 -08:00
2026-03-05 07:25:04 +00:00
2026-03-05 12:53:56 -06:00
2026-03-03 21:40:38 -06:00
2026-03-04 00:20:44 -06:00
2026-03-03 00:15:15 +00:00
2026-03-05 12:53:56 -06:00
2026-03-01 23:06:10 -08:00
2026-03-03 02:32:46 +00:00
2026-03-01 14:23:46 -08:00
2026-03-02 19:57:33 +00:00
2026-02-22 13:19:25 +01:00
2026-02-22 13:19:25 +01:00
2026-03-03 02:41:52 -05:00
2026-03-03 02:41:52 -05:00