Repository navigation
Commit c7fb528
fix(cli): preserve a 401 on the final request attempt (#1370)
When two transient errors are followed by a 401, the CLI refreshes its
OAuth token even though no request attempts remain, then throws
`Exhausted all retry attempts`. Return the original 401 and response
body instead so callers retain the authentication error.
Extracts the 401 fix from #1367. Earlier 401 recovery and the retry
budget stay unchanged. One regression test reuses the existing API/OAuth
fixture to cover `503 → 503 → 401` and verify that no unused token
refresh occurs.
Co-authored-by: GPT-6 <noreply@openai.com>1 parent 9358775 commit c7fb528
2 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
324 | | - | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
228 | 243 | | |
229 | 244 | | |
230 | 245 | | |
| |||
0 commit comments