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

Proposal: Add metadata in gRPC error #667

Merged
merged 2 commits into from
Oct 29, 2019

Conversation

at-ishikawa
Copy link
Contributor

What

  • Add trailers as metadata or response headers as metadata in Error

What is not

  • metadata for response is not included

Why

Main motivation is to get grpc-status-details-bin on clients, discussed in #399 .

  • My 1st thought was decode grpc-status-details-bin and include details in errors. But
    • This metadata is not defined in gRPC spec. So this is not official and could be different/updated in implementations in each languages/libraries.
    • Even though details field of status is included in status.proto, grpc-status-details-bin returned in grpc-go is not encoded details, but encoded status.
  • If status event is subscribed, metadata from trailers can be retrieved. But there is no way using PromiseClient.
  • By this implementations, custom metadata defined in gRPC spec can also retrieved.

@at-ishikawa
Copy link
Contributor Author

kokoro hasn't finished running, though I created about a day ago. Can someone check this?

@stanley-cheung
Copy link
Collaborator

Yes I will get to this as soon as possible.

Copy link
Collaborator

@stanley-cheung stanley-cheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contributions. Looks good to me. Thanks for including tests too!

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.

3 participants