feat(grpc): introduce Status and ServerStatus types#2454
Merged
sauravzg merged 2 commits intohyperium:masterfrom Dec 24, 2025
Merged
feat(grpc): introduce Status and ServerStatus types#2454sauravzg merged 2 commits intohyperium:masterfrom
sauravzg merged 2 commits intohyperium:masterfrom
Conversation
eeba83e to
0f5b3d3
Compare
darth-raijin
left a comment
There was a problem hiding this comment.
I left one suggestion on the tests about avoiding duplication of the "ok" message by assigning it to a variable and reusing it in the assertions. It should make the test a bit less brittle if the message ever changes.
Introduces the foundational `Status` and `ServerStatus` types for gRPC status handling. * `Status`: Represents a standard gRPC status with a code and message. * `ServerStatus`: A wrapper around `Status` designed to prevent accidental leakage of sensitive server errors to the client. This type distinction ensures that handlers must explicitly convert to `Status`, encouraging a conscious decision about what information is exposed. * `StatusCode`: Enum representing standard gRPC status codes. This implementation provides the necessary types to unblock server-side API development. This is not meant to be an intermediate or final Status implementation but serves as a way to implement functional requirements while we design the final `Status`.
dfawley
reviewed
Dec 4, 2025
dfawley
approved these changes
Dec 18, 2025
Collaborator
dfawley
left a comment
There was a problem hiding this comment.
This is fine, but I do think we should strongly consider aligning a little more with the internal design for Status, particularly having a StatusError type that can't represent OK, and a Status that is Result<(), StatusError> for now. That might help prevent future misconceptions/etc.
Collaborator
Author
|
Noted. I have unfortunately progressed a lot on my branch. So, I'll take it as a todo and migrate all code to use a Status like approach in a future change. |
jen20
pushed a commit
to jen20/tonic
that referenced
this pull request
Dec 30, 2025
Introduces the foundational `Status` and `ServerStatus` types for gRPC status handling. * `Status`: Represents a standard gRPC status with a code and message. * `ServerStatus`: A wrapper around `Status` designed to prevent accidental leakage of sensitive server errors to the client. This type distinction ensures that handlers must explicitly convert to `Status`, encouraging a conscious decision about what information is exposed. * `StatusCode`: Enum representing standard gRPC status codes. **This implementation provides the necessary types to unblock server-side API development without relying on a heavy `tonic::Status`. This is not meant to be an intermediate or final Status implementation but serves as a way to implement functional requirements while we design the final `Status`.**
grembo
pushed a commit
to grembo/tonic
that referenced
this pull request
Feb 3, 2026
Introduces the foundational `Status` and `ServerStatus` types for gRPC status handling. * `Status`: Represents a standard gRPC status with a code and message. * `ServerStatus`: A wrapper around `Status` designed to prevent accidental leakage of sensitive server errors to the client. This type distinction ensures that handlers must explicitly convert to `Status`, encouraging a conscious decision about what information is exposed. * `StatusCode`: Enum representing standard gRPC status codes. **This implementation provides the necessary types to unblock server-side API development without relying on a heavy `tonic::Status`. This is not meant to be an intermediate or final Status implementation but serves as a way to implement functional requirements while we design the final `Status`.**
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces the foundational
StatusandServerStatustypes for gRPC status handling.Status: Represents a standard gRPC status with a code and message.ServerStatus: A wrapper aroundStatusdesigned to prevent accidental leakage of sensitive server errors to the client. This type distinction ensures that handlers must explicitly convert toStatus, encouraging a conscious decision about what information is exposed.StatusCode: Enum representing standard gRPC status codes.This implementation provides the necessary types to unblock server-side API development without relying on a heavy
tonic::Status. This is not meant to be an intermediate or final Status implementation but serves as a way to implement functional requirements while we design the finalStatus.