Skip to content

Allow to access response payload in retry::Builder::{classify, classify_fn} #2852

@tnull

Description

@tnull

I'm currently trying to replace our homebrewn retry logic with the retry::Builder shipped in reqwest v0.12.23.

Two things stand out to me that currently make it hard for us to switch or are a regression compared to what we had:

  1. Not all types in the API are actually exposed. In particular ReqRep and Classify are currently inaccessible. Given the comment at the beginning of mod classify, this seems intentional, but is rather unfortunate.

  2. More importantly: in our use case we need to access the payload of the raw response (in bytes), parse it (protobuf), and then based on the values there decide whether the error is retryable. It would therefore be great if the classify/classify_fn APIs would allow us to actually access the (error) response.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-retryArea: retries.C-featureCategory: feature. This is requesting a new feature.S-needs-more-infoStatus: More information is required to understand the issue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions