Skip to content

fix: 4xx errors should not be retryable#5831

Merged
davidzhao merged 3 commits into
mainfrom
dz/handle-4xx
May 25, 2026
Merged

fix: 4xx errors should not be retryable#5831
davidzhao merged 3 commits into
mainfrom
dz/handle-4xx

Conversation

@davidzhao
Copy link
Copy Markdown
Member

there are two knobs to control if a request is retryable:

  1. has it produced a response already (if so, retrying it produces unpredictable output)
  2. what type of error is it? 4xx means client made a mistake, which generally cannot be retried

currently we are assuming a single retryable flag is setting both, where it actually only reflects 1. this fix addresses 2 in a central manner, so the retryable flag is only used for 1.

there are two knobs to control if a request is retryable:
1. has it produced a response already (if so, retrying it produces unpredictable output)
2. what type of error is it? 4xx means client made a mistake, which generally cannot be retried

currently we are assuming a single `retryable` flag is setting both, where
it actually only reflects 1. this fix addresses 2 in a central manner, so
the retryable flag is only used for 1.
@davidzhao davidzhao requested a review from a team May 24, 2026 21:14
devin-ai-integration[bot]

This comment was marked as resolved.

@davidzhao davidzhao merged commit 575cc0a into main May 25, 2026
26 checks passed
@davidzhao davidzhao deleted the dz/handle-4xx branch May 25, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants