Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tonic): Extract transport error source when creating Status #766

Conversation

Guiguiprim
Copy link

Motivation

When experiencing transport errors the status object doesn't give much useful information: Status { code: Unknown, message: "transport error", source: None }.

"transport error" is the display message for tonic::transport::error::Error of kind tonic::transport::error::Kind::Transport.
tonic::transport::error::Error contains a source field which could give more information about the underlying issue but is not included in the display message nor extracted into the status object.

Solution

When creating a Status from an Box<dyn Error> we tries to extract the source data if it is a tonic::transport::error::Error.

@LucioFranco
Copy link
Member

Hey! Seems like we hit the same issue :D Going to close this as I think #799 covers this use case a bit better since it just wraps all source instead of just transport ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants