You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation:
A common extension to gRPC is a the detailed error model. While not a
standard gRPC feature it is widely used. The standard error model only
allows for a status code and message to be propagated to the client. The
detailed error model allows users to use a common set of structured
errors and send them to the client in metadata. The model uses the
'google.rpc.Status' protobuf message to describe the error and any error
details.
Modifications:
- Update the fetch and generate protobuf scripts to get and build the
relevant standard protobuf messages.
- Add `ErrorDetails` which is a container for common error types. Each
of the error types maps to one a standard error detail from the
detailed error model.
- Add a `GoogleRPCStatus` error which maps to the 'google.rpc.Status'
protobuf. This also conforms to `RPCErrorConvertible` so gRPC will
automaticlly turn it into an appropriate status and metadata.
- Add a helper for unpacking the `GoogleRPCStatus` from an `RPCError`.
Result:
Support for the detailed error mode.
0 commit comments