hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.34k stars 269 forks source link

Bad feedback on reset stream #592

Open Icelk opened 2 years ago

Icelk commented 2 years ago

When a stream is reset before calling send_response, the error returned is a Error::User.

That variant doesn't contain any data telling what caused the issue. I propose adding some form of feedback to at least the debug implementation.

This is the file where the error is returned, without any context.

seanmonstar commented 2 years ago

That sounds like a good improvement to me!

Icelk commented 2 years ago

This seems like quite a large change, since we'd have to change the (Error)Kind::User variant.

What data should we attach? Another enum containing the context of the user error?

I'd gladly open a PR.

Icelk commented 2 years ago

@seanmonstar Any feedback? :)