Koskamo

Status codes and error handling

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

When a gRPC call completes successfully the server returns an OK status; on failure, gRPC returns one of its error status codes with an optional string error message, and this standard error model is supported by all gRPC client and server libraries independent of the data format. Common codes include CANCELLED when the client application cancelled the request, DEADLINE_EXCEEDED when the deadline expired, UNIMPLEMENTED when the method is not found on the server, UNAVAILABLE when the server is shutting down or the connection breaks after some data was transmitted, UNKNOWN when the server threw an exception, RESOURCE_EXHAUSTED when flow-control resource limits are reached, and UNAUTHENTICATED when credentials fail. With protocol buffers you can adopt the richer error model developed by Google, which carries extra error details as one or more protobuf messages in trailing metadata and is supported in the C++, Go, Java, Python, and Ruby libraries. Weigh it carefully: proxies and loggers cannot see the details, large detail payloads can hit protocol limits, and the grpc-core library will likely never support it. Scope: gRPC. Reviewed October 4, 2026.

Source and provenance

Original source
grpc.io
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.