Commit 753637c
committed
Check HTTP status codes in isTerminalError
Enhance isTerminalError() to check HTTP status codes before falling back
to error message string matching. This provides more reliable error
classification.
Priority order:
1. HTTP status code (if available) - 4xx except 429 are terminal
2. Error message patterns (fallback)
This ensures:
- 400, 401, 403, 404 -> terminal (don't retry)
- 429, 503, 5xx -> retryable (will retry)
- Non-HTTP errors -> check message strings
Addresses review feedback on PR #3201 parent fa63f3b commit 753637c
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
0 commit comments