tonic icon indicating copy to clipboard operation
tonic copied to clipboard

feat(grpc): introduce Status and ServerStatus types

Open sauravzg opened this issue 1 month ago • 0 comments

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.

sauravzg avatar Nov 26 '25 12:11 sauravzg