Rich Error Models with google.rpc.Status
Go beyond plain status codes by attaching structured, machine-readable error details using the google.rpc.Status model and standard error detail types.
Limits of Plain Status Codes
A bare status code plus a message tells the client that something failed, but not the structured why. Clients often need field-level validation errors, retry hints, or quota info.
The rich error model attaches structured details to a status.
The google.rpc.Status Message
The core type is google.rpc.Status with three fields:
- code: a numeric status code
- message: developer-facing text
- details: a repeated list of
Anypayloads
All lessons in this course
- Status Codes and Error Handling
- Custom Metadata Transmission
- Context and Deadlines
- Rich Error Models with google.rpc.Status