pub struct LoggingRetryableStrategy {}Expand description
reqwest_retry helpfully logs something when a request is being retried:
https://docs.rs/reqwest-retry/0.5.0/src/reqwest_retry/middleware.rs.html#142
This includes how many times it’s been retried and how long it will wait.
But it doesn’t log why it was retried unfortunately.
I think the easiest way to make it log that is to wrap the RetryStrategy, which is the component that decides when an error is retriable. Whenever it says that the error is a Transient error (and should be retried), we can log the error details. The wrapped RetryStrategy can then be dropped in to the RetryTransientMiddleware.
Note: We deviated from DefaultRetryableStrategy because we don’t consider 429 retryable.
Trait Implementations§
Source§impl Default for LoggingRetryableStrategy
impl Default for LoggingRetryableStrategy
Source§fn default() -> LoggingRetryableStrategy
fn default() -> LoggingRetryableStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LoggingRetryableStrategy
impl RefUnwindSafe for LoggingRetryableStrategy
impl Send for LoggingRetryableStrategy
impl Sync for LoggingRetryableStrategy
impl Unpin for LoggingRetryableStrategy
impl UnsafeUnpin for LoggingRetryableStrategy
impl UnwindSafe for LoggingRetryableStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more