DocumentationAPI reference

Rust · 0.1.0

Status

The REST error body: numeric gRPC code, explanatory message and optional typed details.

Check transport and state

Read the HTTP status as well as this body. details entries can carry @type and retry information. Connect's error body has a different representation. Not every error is retryable, and a write error does not guarantee rollback after storage cleanup starts. See the common API calling conventions for retry guidance.

Where this schema is used

These links are derived from direct references in the protocol snapshot. Follow the calling operation for authentication, accepted fields and runtime behavior; a reusable resource schema is not by itself a complete write request.

Shape and fields

object

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).

FieldType / requirementDescription
codeinteger (int32)The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
messagestringA 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.
detailsarray<GoogleProtobufAny>A list of messages that carry the error details. There is a common set of message types for APIs to use.

Complete schema

Use this complete JSON definition for constraints and nested structure. A field's presence here does not mean it is writable by every caller.

{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].",
      "format": "int32"
    },
    "message": {
      "type": "string",
      "description": "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."
    },
    "details": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/GoogleProtobufAny"
      },
      "description": "A list of messages that carry the error details.  There is a common set of message types for APIs to use."
    }
  },
  "description": "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)."
}