Inconsistent e.is_timeout()
After Upgrading to reqwest-retry 0.7.0
and reqwest-middleware 0.4.0
#207
Labels
bug
Something isn't working
Bug description
In my project, I am using
reqwest-retry
andreqwest-middleware
to manage retries and timeouts. Withreqwest-retry 0.6.1
andreqwest-middleware 0.3.3
, timeout errors are correctly detected and I can add a custom message. However, after upgrading toreqwest-retry 0.7.0
andreqwest-middleware 0.4.0
, the behavior ofe.is_timeout()
changes, causing inconsistency in how timeout errors are detected.To Reproduce
Steps to reproduce the behavior:
reqwest-retry 0.6.1
andreqwest-middleware 0.3.3
reqwest-retry 0.7.0
andreqwest-middleware 0.4.0
reqwest-retry 0.6.1
andreqwest-middleware 0.3.3
:The output of
reqwest-retry 0.7.0
andreqwest-middleware 0.4.0
:Expected behavior
The
e.is_timeout()
function should behave consistently across both versions, allowing me to detect and handle timeout errors reliably. I expect that in both cases, the timeout error is identified and a user-friendly message is attachedEnvironment
Additional context
The inconsistency with
e.is_timeout()
has caused issues in handling timeout errors. I would like to know if this change in behavior is intentional, and if so, how to correctly handle timeout errors in the new version, whether they come fromError::Middleware
orError::Reqwest
. Can you give me a example?The text was updated successfully, but these errors were encountered: