Expose a function to check if a hyper::Error
is due to a BodyWrite
#3609
Labels
C-feature
Category: feature. This is adding a new feature.
Is your feature request related to a problem? Please describe.
Originally reported in apache/arrow-rs#5545, where they pointed me to ask some questions here. The gist of the problem is:
When using
object_store
, we've occasionally hit errors that point to this hyper error:We would like to retry this specific error as it seems like something that should be retryable in our use case, but
BodyWrite
(andBody
I suppose) both don't seem to expose any public functions to determine this at a glance.Describe the solution you'd like
Add a
is_body_write()
(and maybe ais_body
for feature parity with reads) function.Describe alternatives you've considered
The current workaround we're doing is checking the
Display
output and checking if it matches the error message associated withBodyWrite
- this works but it feels like a terrible workaround and is outright pointed out in the docs to not depend on this behaviour.Additional context
If there's a better method or a reason this error reason isn't exposed, please let me know!
The text was updated successfully, but these errors were encountered: