Skip to content

fix: reset err on each attempt in StandardRetryer - #238

Open
mirkan wants to merge 1 commit into
TencentCloud:masterfrom
mirkan:fix/retryer-stale-error
Open

mirkan wants to merge 1 commit into
TencentCloud:masterfrom
mirkan:fix/retryer-stale-error

Conversation

@mirkan

@mirkan mirkan commented Nov 24, 2026

Copy link
Copy Markdown

StandardRetryer.send_request (sync and async) never cleared err between attempts. After a retryable failure followed by a successful call, should_retry(resp, err) still saw the old error, so it kept retrying and finally raised the stale error. A call that failed once was never recovered.

Reset err at the start of each attempt. Add unit tests (sync and async) where the call fails twice and then succeeds.

StandardRetryer.send_request (sync and async) never cleared err between
attempts. After a retryable failure followed by a successful call,
should_retry(resp, err) still saw the old error, so it kept retrying and
finally raised the stale error. A call that failed once was never recovered.

Reset err at the start of each attempt. Add unit tests (sync and async)
where the call fails twice and then succeeds.
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.

1 participant