Skip to content

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

Open
@nashfive

Description

@nashfive

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions