Skip to content

Body-related errors of requests over HTTP/2 are swallowed by Hyper #2547

Open
@nox

Description

@nox

Errors emitted by the HttpBody impl sent as a request body through the HTTP/2 client are not returned to the caller.

let mut pipe = Box::pin(PipeToSendStream::new(body, body_tx)).map(|res| {
if let Err(e) = res {
debug!("client request body error: {}", e);
}
});

I understand that this is because contrary to HTTP/1, the request body can be sent at the same as the response is received, so Hyper doesn't wait before returning the response, but that also means that the errors completely disappear and Hyper only notices something went wrong when trying to receive the response body, at which point it returns to the caller an error about the stream being reset.

Any ideas on how to improve that? Maybe we should implement an Extension that lets us await on a one-time channel to get the error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-http2Area: HTTP/2 specific.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions