Support Exception Groups for RetryException #573
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
When a retry operation fails, it emits a RetryException, with the cause field populated to give context on the latest failure in the chain
While showing the latest failure is helpful, we lose the context on all the other errors that occurred before the final terminal failure
Python 3.11+ has a new ExceptionGroup type, which gives a helpful traceback of a group of exceptions that should be raised together. We should use this for RetryErrors where supported
Rough code I had in mind:
--
This might also be a good chance to re-think RetryError a bit. Maybe make a subclass called
OperationTimeout
, since that's a more accurate explanation of the error. Include the timeout value itself. Maybe make a separateRetryExhausted
subclass if we implement amax_attempts
option as wellThe text was updated successfully, but these errors were encountered: