Skip to content

improper error handling with from h2 reason::cancel -> tonic::code::unkown #848

@lyang24

Description

@lyang24

Bug Report

Version: latest

Platform: all (linux)

Crates

http_body, hyper, h2

Description

maybe Streaming::message need to handle h2 error?

pub async fn message(&mut self) -> Result<Option<T>, Status> {

called from here
if let Some(trailers) = body.trailers().await? {

I expected to see this happen: Code::Cancelled, message: stream no longer needed

Instead, this happened: code: Unknown, message: "error reading a body from connection: stream error received: stream no longer needed

Todo add minimal reproduce example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions