Return error instead of panicing when server not ready
- Dominant language
- Rust
- Stars
- 166
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
I'm running into an `assert!(...)` here, which should probably just return an error, instead: https://docs.rs/async-h1/2.1.2/src/async_h1/client/decode.rs.html#32
(I think that's what the `TODO` there is suggesting.)
In this case, I know that the server I'm querying may not be up yet -- I'm issuing requests in a loop with a timeout, for the purpose of waiting for the server to come up all the way.
Contributor guide
Research direction
Start in async_h1/client/decode.rs around the assert at line 32 and read the nearby TODO. Reproduce a request while the server is unavailable, then verify that this path returns an error rather than panicking. Done means the reported not-ready-server case no longer triggers the assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100