Skip to main content

RpcError

Standardized error payload following google.rpc.Status (AIP-193). Used across all response messages and event payloads.

Usage profiles​

UsageFields and validation
In requestsView fields
In responsesView fields
In webhook payloadsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
codestring (ERROR_CODE_CANCELLED, ERROR_CODE_UNKNOWN, ERROR_CODE_INVALID_ARGUMENT, ERROR_CODE_DEADLINE_EXCEEDED, ERROR_CODE_NOT_FOUND, ERROR_CODE_ALREADY_EXISTS, ERROR_CODE_PERMISSION_DENIED, ERROR_CODE_RESOURCE_EXHAUSTED, ERROR_CODE_FAILED_PRECONDITION, ERROR_CODE_ABORTED, ERROR_CODE_OUT_OF_RANGE, ERROR_CODE_UNIMPLEMENTED, ERROR_CODE_INTERNAL, ERROR_CODE_UNAVAILABLE, ERROR_CODE_DATA_LOSS, ERROR_CODE_UNAUTHENTICATED, ERROR_CODE_MODEL_INVALID, ERROR_CODE_MODEL_UNAVAILABLE, ERROR_CODE_MODERATION_FLAGGED, ERROR_CODE_GENERATION_FAILED, ERROR_CODE_TOOL_EXECUTION_FAILED, ERROR_CODE_UPSTREAM_PROVIDER, ERROR_CODE_VALIDATION_EXHAUSTED, ERROR_CODE_PAYMENT_REQUIRED) or integer (int32)OptionalMachine-readable error code. Clients switch on this field.
messagestringOptionalHuman-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead.
isTerminalbooleanOptionalWhether this error is terminal (non-retryable). When true, repeating the same request will produce the same error. When false, transient condition may resolve on retry.
detailsErrorDetailsOptionalStructured error details. At most one of each detail type. Follows google.rpc.Status details pattern but uses concrete types instead of google.protobuf.Any for type safety and codegen.

Values of code​

Machine-readable reason that a request or operation failed; inspect the accompanying error details for context.

ValueNo.FormMeaning
ERROR_CODE_CANCELLED1CanonicalThe caller cancelled the operation before it completed.
ERROR_CODE_UNKNOWN2CanonicalThe operation failed without a more specific error classification.
ERROR_CODE_INVALID_ARGUMENT3CanonicalThe request contains an invalid argument or field value.
ERROR_CODE_DEADLINE_EXCEEDED4CanonicalThe operation did not complete before its deadline.
ERROR_CODE_NOT_FOUND5CanonicalThe requested resource does not exist or could not be found.
ERROR_CODE_ALREADY_EXISTS6CanonicalThe requested creation conflicts with a resource that already exists.
ERROR_CODE_PERMISSION_DENIED7CanonicalThe authenticated caller is not permitted to perform the operation.
ERROR_CODE_RESOURCE_EXHAUSTED8CanonicalA quota, rate limit or other capacity limit prevented the operation.
ERROR_CODE_FAILED_PRECONDITION9CanonicalThe operation requires a system or resource state that is not currently satisfied.
ERROR_CODE_ABORTED10CanonicalThe operation was aborted, for example by a concurrent modification conflict.
ERROR_CODE_OUT_OF_RANGE11CanonicalAn argument is outside the range supported by this operation.
ERROR_CODE_UNIMPLEMENTED12CanonicalThe requested operation is not implemented.
ERROR_CODE_INTERNAL13CanonicalAn internal failure prevented the operation from completing.
ERROR_CODE_UNAVAILABLE14CanonicalThe service or a required dependency is temporarily unavailable.
ERROR_CODE_DATA_LOSS15CanonicalThe operation encountered unrecoverable loss or corruption of data.
ERROR_CODE_UNAUTHENTICATED16CanonicalAuthentication credentials are missing or invalid.
ERROR_CODE_MODEL_INVALID600CanonicalThe requested model identifier is absent from the model catalog.
ERROR_CODE_MODEL_UNAVAILABLE601CanonicalThe model exists, but no provider is currently available to serve it.
ERROR_CODE_MODERATION_FLAGGED602CanonicalContent moderation flagged the submitted content.
ERROR_CODE_GENERATION_FAILED603CanonicalModel generation failed after its configured attempts.
ERROR_CODE_TOOL_EXECUTION_FAILED604CanonicalExecution of a requested tool failed.
ERROR_CODE_UPSTREAM_PROVIDER605CanonicalAn upstream model provider returned an error.
ERROR_CODE_VALIDATION_EXHAUSTED606CanonicalStructured-output validation still failed after the configured attempts.
ERROR_CODE_PAYMENT_REQUIRED607CanonicalThe account lacks the credits required for the operation.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
codestring (ERROR_CODE_CANCELLED, ERROR_CODE_UNKNOWN, ERROR_CODE_INVALID_ARGUMENT, ERROR_CODE_DEADLINE_EXCEEDED, ERROR_CODE_NOT_FOUND, ERROR_CODE_ALREADY_EXISTS, ERROR_CODE_PERMISSION_DENIED, ERROR_CODE_RESOURCE_EXHAUSTED, ERROR_CODE_FAILED_PRECONDITION, ERROR_CODE_ABORTED, ERROR_CODE_OUT_OF_RANGE, ERROR_CODE_UNIMPLEMENTED, ERROR_CODE_INTERNAL, ERROR_CODE_UNAVAILABLE, ERROR_CODE_DATA_LOSS, ERROR_CODE_UNAUTHENTICATED, ERROR_CODE_MODEL_INVALID, ERROR_CODE_MODEL_UNAVAILABLE, ERROR_CODE_MODERATION_FLAGGED, ERROR_CODE_GENERATION_FAILED, ERROR_CODE_TOOL_EXECUTION_FAILED, ERROR_CODE_UPSTREAM_PROVIDER, ERROR_CODE_VALIDATION_EXHAUSTED, ERROR_CODE_PAYMENT_REQUIRED) or integer (int32)OptionalMachine-readable error code. Clients switch on this field.
messagestringOptionalHuman-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead.
isTerminalbooleanOptionalWhether this error is terminal (non-retryable). When true, repeating the same request will produce the same error. When false, transient condition may resolve on retry.
detailsErrorDetailsOptionalStructured error details. At most one of each detail type. Follows google.rpc.Status details pattern but uses concrete types instead of google.protobuf.Any for type safety and codegen.

Values of code​

Machine-readable reason that a request or operation failed; inspect the accompanying error details for context.

ValueNo.FormMeaning
ERROR_CODE_CANCELLED1CanonicalThe caller cancelled the operation before it completed.
ERROR_CODE_UNKNOWN2CanonicalThe operation failed without a more specific error classification.
ERROR_CODE_INVALID_ARGUMENT3CanonicalThe request contains an invalid argument or field value.
ERROR_CODE_DEADLINE_EXCEEDED4CanonicalThe operation did not complete before its deadline.
ERROR_CODE_NOT_FOUND5CanonicalThe requested resource does not exist or could not be found.
ERROR_CODE_ALREADY_EXISTS6CanonicalThe requested creation conflicts with a resource that already exists.
ERROR_CODE_PERMISSION_DENIED7CanonicalThe authenticated caller is not permitted to perform the operation.
ERROR_CODE_RESOURCE_EXHAUSTED8CanonicalA quota, rate limit or other capacity limit prevented the operation.
ERROR_CODE_FAILED_PRECONDITION9CanonicalThe operation requires a system or resource state that is not currently satisfied.
ERROR_CODE_ABORTED10CanonicalThe operation was aborted, for example by a concurrent modification conflict.
ERROR_CODE_OUT_OF_RANGE11CanonicalAn argument is outside the range supported by this operation.
ERROR_CODE_UNIMPLEMENTED12CanonicalThe requested operation is not implemented.
ERROR_CODE_INTERNAL13CanonicalAn internal failure prevented the operation from completing.
ERROR_CODE_UNAVAILABLE14CanonicalThe service or a required dependency is temporarily unavailable.
ERROR_CODE_DATA_LOSS15CanonicalThe operation encountered unrecoverable loss or corruption of data.
ERROR_CODE_UNAUTHENTICATED16CanonicalAuthentication credentials are missing or invalid.
ERROR_CODE_MODEL_INVALID600CanonicalThe requested model identifier is absent from the model catalog.
ERROR_CODE_MODEL_UNAVAILABLE601CanonicalThe model exists, but no provider is currently available to serve it.
ERROR_CODE_MODERATION_FLAGGED602CanonicalContent moderation flagged the submitted content.
ERROR_CODE_GENERATION_FAILED603CanonicalModel generation failed after its configured attempts.
ERROR_CODE_TOOL_EXECUTION_FAILED604CanonicalExecution of a requested tool failed.
ERROR_CODE_UPSTREAM_PROVIDER605CanonicalAn upstream model provider returned an error.
ERROR_CODE_VALIDATION_EXHAUSTED606CanonicalStructured-output validation still failed after the configured attempts.
ERROR_CODE_PAYMENT_REQUIRED607CanonicalThe account lacks the credits required for the operation.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
codestring (ERROR_CODE_CANCELLED, ERROR_CODE_UNKNOWN, ERROR_CODE_INVALID_ARGUMENT, ERROR_CODE_DEADLINE_EXCEEDED, ERROR_CODE_NOT_FOUND, ERROR_CODE_ALREADY_EXISTS, ERROR_CODE_PERMISSION_DENIED, ERROR_CODE_RESOURCE_EXHAUSTED, ERROR_CODE_FAILED_PRECONDITION, ERROR_CODE_ABORTED, ERROR_CODE_OUT_OF_RANGE, ERROR_CODE_UNIMPLEMENTED, ERROR_CODE_INTERNAL, ERROR_CODE_UNAVAILABLE, ERROR_CODE_DATA_LOSS, ERROR_CODE_UNAUTHENTICATED, ERROR_CODE_MODEL_INVALID, ERROR_CODE_MODEL_UNAVAILABLE, ERROR_CODE_MODERATION_FLAGGED, ERROR_CODE_GENERATION_FAILED, ERROR_CODE_TOOL_EXECUTION_FAILED, ERROR_CODE_UPSTREAM_PROVIDER, ERROR_CODE_VALIDATION_EXHAUSTED, ERROR_CODE_PAYMENT_REQUIRED) or integer (int32)OptionalMachine-readable error code. Clients switch on this field.
messagestringOptionalHuman-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead.
is_terminalbooleanOptionalWhether this error is terminal (non-retryable). When true, repeating the same request will produce the same error. When false, transient condition may resolve on retry.
detailsErrorDetailsOptionalStructured error details. At most one of each detail type. Follows google.rpc.Status details pattern but uses concrete types instead of google.protobuf.Any for type safety and codegen.

Values of code​

Machine-readable reason that a request or operation failed; inspect the accompanying error details for context.

ValueNo.FormMeaning
ERROR_CODE_CANCELLED1CanonicalThe caller cancelled the operation before it completed.
ERROR_CODE_UNKNOWN2CanonicalThe operation failed without a more specific error classification.
ERROR_CODE_INVALID_ARGUMENT3CanonicalThe request contains an invalid argument or field value.
ERROR_CODE_DEADLINE_EXCEEDED4CanonicalThe operation did not complete before its deadline.
ERROR_CODE_NOT_FOUND5CanonicalThe requested resource does not exist or could not be found.
ERROR_CODE_ALREADY_EXISTS6CanonicalThe requested creation conflicts with a resource that already exists.
ERROR_CODE_PERMISSION_DENIED7CanonicalThe authenticated caller is not permitted to perform the operation.
ERROR_CODE_RESOURCE_EXHAUSTED8CanonicalA quota, rate limit or other capacity limit prevented the operation.
ERROR_CODE_FAILED_PRECONDITION9CanonicalThe operation requires a system or resource state that is not currently satisfied.
ERROR_CODE_ABORTED10CanonicalThe operation was aborted, for example by a concurrent modification conflict.
ERROR_CODE_OUT_OF_RANGE11CanonicalAn argument is outside the range supported by this operation.
ERROR_CODE_UNIMPLEMENTED12CanonicalThe requested operation is not implemented.
ERROR_CODE_INTERNAL13CanonicalAn internal failure prevented the operation from completing.
ERROR_CODE_UNAVAILABLE14CanonicalThe service or a required dependency is temporarily unavailable.
ERROR_CODE_DATA_LOSS15CanonicalThe operation encountered unrecoverable loss or corruption of data.
ERROR_CODE_UNAUTHENTICATED16CanonicalAuthentication credentials are missing or invalid.
ERROR_CODE_MODEL_INVALID600CanonicalThe requested model identifier is absent from the model catalog.
ERROR_CODE_MODEL_UNAVAILABLE601CanonicalThe model exists, but no provider is currently available to serve it.
ERROR_CODE_MODERATION_FLAGGED602CanonicalContent moderation flagged the submitted content.
ERROR_CODE_GENERATION_FAILED603CanonicalModel generation failed after its configured attempts.
ERROR_CODE_TOOL_EXECUTION_FAILED604CanonicalExecution of a requested tool failed.
ERROR_CODE_UPSTREAM_PROVIDER605CanonicalAn upstream model provider returned an error.
ERROR_CODE_VALIDATION_EXHAUSTED606CanonicalStructured-output validation still failed after the configured attempts.
ERROR_CODE_PAYMENT_REQUIRED607CanonicalThe account lacks the credits required for the operation.

Where used​

ReferenceRelationship
Submit client-side tool execution resultsPOST /api/v1/llm/submit-client-tool-results
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
llm.generation_completedWebhook JSON uses protobuf field names (snake_case).
ClientToolResultNested in model
LLMGenerationCompletedEventNested in model

Download the public reference contract.

Document: DOC-API-MODEL-rpc-error.