github.com/grpc-ecosystem/grpc-gateway/v2@v2.19.1/examples/internal/clients/abe/model_rpc_status.go (about) 1 /* 2 * A Bit of Everything 3 * 4 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 5 * 6 * API version: 1.0 7 * Contact: none@example.com 8 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) 9 */ 10 11 package abe 12 13 // The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). 14 type RpcStatus struct { 15 // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. 16 Code int32 `json:"code,omitempty"` 17 // A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. 18 Message string `json:"message,omitempty"` 19 // A list of messages that carry the error details. There is a common set of message types for APIs to use. 20 Details []ProtobufAny `json:"details,omitempty"` 21 }