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(types): Add gRPC Richer Error Model support (QuotaFailure) #1204

Merged
merged 4 commits into from Jan 4, 2023

Conversation

flemosr
Copy link
Contributor

@flemosr flemosr commented Dec 19, 2022

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.

Solution

This PR continues the work initiated in #1068, building on the changes made in #1179. It adds support for the QuotaFailure standard error message type to tonic-types.

@@ -120,18 +166,23 @@ impl ErrorDetails {
}

/// Get [`RetryInfo`] details, if any
pub fn retry_info(&self) -> Option<RetryInfo> {
self.retry_info.clone()
pub fn retry_info(&self) -> &Option<RetryInfo> {
Copy link
Member

Choose a reason for hiding this comment

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

Should these be Option<&Foo>? This is also a breaking change so maybe we should do this later and save it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not see that v0.6.1 was released 😅 . Sorry about that. Yes, better to do this later, I pushed a commit to revert this change. Thanks!

@LucioFranco LucioFranco merged commit 03b4735 into hyperium:master Jan 4, 2023
@flemosr flemosr deleted the richer-error-split-4 branch February 13, 2023 19:49
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.

None yet

2 participants