You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I own some client libraries that are built on top of reqwest. Let's say I have an idempotent request. I attempt to make it and receive a reqwest::Error. What logic should I use to determine if the error is retryable (e.g. a transient connection error, or some incomplete frame).
I see #2811, and am aware of the retry module, but I need to handle the retry loop (backoffs, total number of attempts, etc.) in my layers. So that will not work for me.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hey, I own some client libraries that are built on top of
reqwest. Let's say I have an idempotent request. I attempt to make it and receive areqwest::Error. What logic should I use to determine if the error is retryable (e.g. a transient connection error, or some incomplete frame).I see #2811, and am aware of the
retrymodule, but I need to handle the retry loop (backoffs, total number of attempts, etc.) in my layers. So that will not work for me.We are currently using this logic, but our customers report it is too conservative (googleapis/google-cloud-rust#5864).
I have also found a
reqwest-middlewarecrate, with this logic, which seems more complete: https://github.com/TrueLayer/reqwest-middleware/blob/614b9474f6bec85c8660e4d52b8d9f12f8359229/reqwest-retry/src/retryable_strategy.rs#L138-L184Would you recommend using
reqwest-middleware's implementation?Do you have any other suggestions on best practices here?
All reactions