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

Improve gRPC richer error model support #1034

Closed
flemosr opened this issue Jul 16, 2022 · 3 comments
Closed

Improve gRPC richer error model support #1034

flemosr opened this issue Jul 16, 2022 · 3 comments

Comments

@flemosr
Copy link
Contributor

flemosr commented Jul 16, 2022

Feature Request

Motivation

The gRPC richer error model is quite useful to send additional feedback to clients, and is supported by many gRPC libraries in other languages. Implementing it using the standard error messages directly (as shown in #401) is not very convenient. Specially when sending multiple additional error detail messages.

Proposal

I recently created a crate (tonic-richer-error) that implements a trait to Status (and provides some structs) aiming to make the implementation of the richer error model more straightforward. It seems to me that incorporating this crate to tonic as an auxiliary crate would be fairly simple. I could transfer the ownership of the released crate or it could be published after revision with another name.

Alternatives

A trait similar to WithErrorDetails could be implemented on the tonic crate itself.

@LucioFranco
Copy link
Member

Hey! Sorry for the delay on this but I finally got some time to fully understand what you're proposing. I think this fits very well into tonic-types in similar vain to prost-types but for gRPC. I would totally accept a PR that adds this support there. Happy to mentor and help out.

@flemosr
Copy link
Contributor Author

flemosr commented Aug 15, 2022

Hi! Yes, I believe it would fit nicely into tonic-types too. I will start working on this PR.

@flemosr
Copy link
Contributor Author

flemosr commented Mar 22, 2023

Solved by #1317 .

@flemosr flemosr closed this as completed Mar 22, 2023
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

No branches or pull requests

2 participants