Implement function is_body() for errors when the error is of Kind::Body
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem? Please describe.
I'm currently running a service that needs to retry a request under certain error conditions. I check for error.is_connect() and tried to for err.is_body() when there is an error reading the body from the connection.
Describe the solution you'd like
I would like to add a function is_body() to the Error implementation that returns True if the error is of Kind::Body.
Describe alternatives you've considered
I'm currently checking for the error message as a substring.
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Error implementation and the Kind enum, then compare the requested check with the existing is_connect() behavior. The work is done when Error exposes is_body() and it returns true for Kind::Body errors, with coverage for that classification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100