tonic
tonic copied to clipboard
feat(grpc): introduce Status and ServerStatus types
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 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 final Status.