http-rs / http-rs/async-h1

Return error instead of panicing when server not ready

Open
#132 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.