You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
The text was updated successfully, but these errors were encountered:
iamsli
changed the title
Improve Error Handling for Context Timeout in Retry Loop
Improve error handling for context timeout in Do
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 :)
The text was updated successfully, but these errors were encountered: