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

[Feature]: include underlying error for HTTP errors with retryAttemptsReached #78

Open
nashfive opened this issue Jan 16, 2023 · 0 comments

Comments

@nashfive
Copy link

What problem are you facing?

Hi,
I am trying to use the retry mechanism and I am wondering if it was possible to include the returned error for the last retry.

For example, I have an endpoint that I want to query until it returns a valid response. Otherwise, if it returns an error response with a specific type in it, I want to do retry. When it reaches the max retries count, I get a HTTPError with the category retryAttemptsReached, but I'd like to know if it could be possible to get the last error response that triggered the retry.

From what I see in the code, the logic is a bit weird: you send that error only at the next retry. Shouldn't it be check after the last response instead?

Other Information

No response

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