-
-
Notifications
You must be signed in to change notification settings - Fork 305
Description
Hello,
First, great library!
I'm running into an issue where I am raising TryAgain, but I am doing this from within an except block. I do this because I am using retry=retry_never so that I can have full control over when Tenacity will retry versus not. I find this pattern easier to understand than using a function passed to the retry kwarg. However, I have noticed that after the last attempt when TryAgain is raised, Tenacity is raising TryAgain itself rather than the underlying exception that it came from. It would be nice if Tenacity here would respect reraise=True and raise the underlying exception itself instead of TryAgain. For now, I think I have found a workaround by subclassing AsyncRetrying and overriding __aiter__ but this seems like a hack.
Let me know your thoughts.
Thanks!