Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling for context timeout in Do #122

Open
iamsli opened this issue Oct 7, 2024 · 0 comments
Open

Improve error handling for context timeout in Do #122

iamsli opened this issue Oct 7, 2024 · 0 comments

Comments

@iamsli
Copy link

iamsli commented Oct 7, 2024

Current Behavior
The Do function returns the context timeout error when the context times out, which obscures the actual error that caused the retries to fail.

Desired Behavior
When the context times out,Do should return the last error encountered during the retry attempts, rather than the context timeout error. This will provide more meaningful information about the root cause of the failure.

Proposed Solution
Modify the Do function to store the last non-context error encountered and return it if the context times out.

This is possibly debatable behavior so definitely up for discussion :)

@iamsli iamsli changed the title Improve Error Handling for Context Timeout in Retry Loop Improve error handling for context timeout in Do Oct 7, 2024
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

No branches or pull requests

1 participant