hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.62k stars 1.6k forks source link

add is_parse_method to hyper::Error #3760

Closed mzr closed 1 month ago

mzr commented 1 month ago

Similarly to is_parse_status I'd like to have a mechanism I can depend on to have custom logic for HTTP method parse errors.

The Kinds of errors are private outside of the crate's code, so seems like helper functions are they way. There are some already, I'm just adding another one.

seanmonstar commented 1 month ago

Thanks for the PR! I appreciate the goal, to make more of the error types actionable. However, I'd really much rather make progress on #2845, and come up with a nicer way to expose details about the error.

mzr commented 1 month ago

Sure thing!