Skip to main content
Section ID: DOC-API-MODEL-schema-1fajlacjs0#overview

RpcError

Error payload containing an API-defined error code, a message and structured details. Interpret code using the ErrorCode enumeration published with this API; numeric equivalence with google.rpc.Status is not implied.

Meaning and usage​

Section ID: DOC-API-MODEL-schema-1fajlacjs0#meaning

See the definition above.

Usage profiles​

Section ID: DOC-API-MODEL-schema-1fajlacjs0#fields

UsageFields and validation
In requestsView fields
In responsesView fields

In requests​

Section ID: DOC-API-MODEL-schema-1fajlacjs0#request

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1fajlacjs0#request-field-codecodestring (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)Optional; explicit presenceMachine-readable error code. Clients switch on this field.
Section ID: DOC-API-MODEL-schema-1fajlacjs0#request-field-messagemessagestringOptionalHuman-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead.
Section ID: DOC-API-MODEL-schema-1fajlacjs0#request-field-isterminalisTerminalbooleanOptionalWhether this error is classified as terminal (non-retryable). A terminal error should not trigger automatic retries of the failed operation. A nonterminal error may reflect a transient condition that can resolve on retry.
Section ID: DOC-API-MODEL-schema-1fajlacjs0#request-field-detailsdetailsErrorDetailsOptionalStructured error details. At most one of each detail type.

Values of code​

Section ID: DOC-API-MODEL-schema-1fajlacjs0#request-values-code

API-defined categories describing why a request or operation failed. Use the published symbolic name and accompanying error details. These numeric assignments are not interchangeable with google.rpc.Code.

ValueNo.FormMeaning
ERROR_CODE_CANCELLED0CanonicalSee meaning below.
ERROR_CODE_UNKNOWN1CanonicalSee meaning below.
ERROR_CODE_INVALID_ARGUMENT2CanonicalSee meaning below.
ERROR_CODE_DEADLINE_EXCEEDED3CanonicalSee meaning below.
ERROR_CODE_NOT_FOUND4CanonicalSee meaning below.
ERROR_CODE_ALREADY_EXISTS5CanonicalSee meaning below.
ERROR_CODE_PERMISSION_DENIED6CanonicalSee meaning below.
ERROR_CODE_RESOURCE_EXHAUSTED7CanonicalSee meaning below.
ERROR_CODE_FAILED_PRECONDITION8CanonicalSee meaning below.
ERROR_CODE_ABORTED9CanonicalSee meaning below.
ERROR_CODE_OUT_OF_RANGE10CanonicalSee meaning below.
ERROR_CODE_UNIMPLEMENTED11CanonicalSee meaning below.
ERROR_CODE_INTERNAL12CanonicalSee meaning below.
ERROR_CODE_UNAVAILABLE13CanonicalSee meaning below.
ERROR_CODE_DATA_LOSS14CanonicalSee meaning below.
ERROR_CODE_UNAUTHENTICATED15CanonicalSee meaning below.
ERROR_CODE_MODEL_INVALID16CanonicalSee meaning below.
ERROR_CODE_MODEL_UNAVAILABLE17CanonicalSee meaning below.
ERROR_CODE_MODERATION_FLAGGED18CanonicalSee meaning below.
ERROR_CODE_GENERATION_FAILED19CanonicalSee meaning below.
ERROR_CODE_TOOL_EXECUTION_FAILED20CanonicalSee meaning below.
ERROR_CODE_UPSTREAM_PROVIDER21CanonicalSee meaning below.
ERROR_CODE_VALIDATION_EXHAUSTED22CanonicalSee meaning below.
ERROR_CODE_PAYMENT_REQUIRED23CanonicalSee meaning below.

ERROR_CODE_CANCELLED

The caller cancelled the operation before it completed.

Canonical error categories.

499 — Cancelled by caller

ERROR_CODE_UNKNOWN

The operation failed without a more specific error classification.

500 — Unknown error

ERROR_CODE_INVALID_ARGUMENT

The request contains an invalid argument or field value.

400 — Bad input, invalid field values

ERROR_CODE_DEADLINE_EXCEEDED

The operation did not complete before its deadline.

504 — Operation timed out

ERROR_CODE_NOT_FOUND

The requested resource does not exist or could not be found.

404 — Resource does not exist

ERROR_CODE_ALREADY_EXISTS

The requested creation conflicts with a resource that already exists.

409 — Resource already exists

ERROR_CODE_PERMISSION_DENIED

The authenticated caller is not permitted to perform the operation.

403 — Caller lacks permission

ERROR_CODE_RESOURCE_EXHAUSTED

A quota, rate limit or other capacity limit prevented the operation.

429 — Rate limited or quota exceeded

ERROR_CODE_FAILED_PRECONDITION

The operation requires a system or resource state that is not currently satisfied.

400 — System not in required state

ERROR_CODE_ABORTED

The operation was aborted, for example by a concurrent modification conflict.

409 — Concurrent conflict, retry may succeed

ERROR_CODE_OUT_OF_RANGE

An argument is outside the range supported by this operation.

400 — Value outside valid range

ERROR_CODE_UNIMPLEMENTED

The requested operation is not implemented.

501 — Not implemented

ERROR_CODE_INTERNAL

An internal failure prevented the operation from completing.

500 — Internal error

ERROR_CODE_UNAVAILABLE

The service or a required dependency is temporarily unavailable.

503 — Service temporarily unavailable

ERROR_CODE_DATA_LOSS

The operation encountered unrecoverable loss or corruption of data.

500 — Unrecoverable data loss

ERROR_CODE_UNAUTHENTICATED

Authentication credentials are missing or invalid.

401 — Missing or invalid credentials

ERROR_CODE_MODEL_INVALID

The requested model identifier is absent from the model catalog.

Domain-specific error categories.

400 — Model ID not found in catalog

ERROR_CODE_MODEL_UNAVAILABLE

The model exists, but no provider is currently available to serve it.

503 — Model exists but all providers are down

ERROR_CODE_MODERATION_FLAGGED

Content moderation flagged the submitted content.

403 — Input flagged by content moderation

ERROR_CODE_GENERATION_FAILED

Model generation failed after its configured attempts.

500 — LLM generation failed after retries

ERROR_CODE_TOOL_EXECUTION_FAILED

Execution of a requested tool failed.

500 — MCP tool call failed

ERROR_CODE_UPSTREAM_PROVIDER

An upstream model provider returned an error.

503 — Upstream provider returned error

ERROR_CODE_VALIDATION_EXHAUSTED

Structured-output validation still failed after the configured attempts.

500 — Structured output validation failed after all retries

ERROR_CODE_PAYMENT_REQUIRED

The account lacks the credits required for the operation.

402 — Insufficient credits

In responses​

Section ID: DOC-API-MODEL-schema-1fajlacjs0#response

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1fajlacjs0#field-codeSection ID: DOC-API-MODEL-schema-1fajlacjs0#response-field-codecodestring (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)Optional; explicit presenceMachine-readable error code. Clients switch on this field.
Section ID: DOC-API-MODEL-schema-1fajlacjs0#field-messageSection ID: DOC-API-MODEL-schema-1fajlacjs0#response-field-messagemessagestringOptionalHuman-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead.
Section ID: DOC-API-MODEL-schema-1fajlacjs0#field-isterminalSection ID: DOC-API-MODEL-schema-1fajlacjs0#response-field-isterminalisTerminalbooleanOptionalWhether this error is classified as terminal (non-retryable). A terminal error should not trigger automatic retries of the failed operation. A nonterminal error may reflect a transient condition that can resolve on retry.
Section ID: DOC-API-MODEL-schema-1fajlacjs0#field-detailsSection ID: DOC-API-MODEL-schema-1fajlacjs0#response-field-detailsdetailsErrorDetailsOptionalStructured error details. At most one of each detail type.

Values of code​

Section ID: DOC-API-MODEL-schema-1fajlacjs0#response-values-code

API-defined categories describing why a request or operation failed. Use the published symbolic name and accompanying error details. These numeric assignments are not interchangeable with google.rpc.Code.

ValueNo.FormMeaning
ERROR_CODE_CANCELLED0CanonicalSee meaning below.
ERROR_CODE_UNKNOWN1CanonicalSee meaning below.
ERROR_CODE_INVALID_ARGUMENT2CanonicalSee meaning below.
ERROR_CODE_DEADLINE_EXCEEDED3CanonicalSee meaning below.
ERROR_CODE_NOT_FOUND4CanonicalSee meaning below.
ERROR_CODE_ALREADY_EXISTS5CanonicalSee meaning below.
ERROR_CODE_PERMISSION_DENIED6CanonicalSee meaning below.
ERROR_CODE_RESOURCE_EXHAUSTED7CanonicalSee meaning below.
ERROR_CODE_FAILED_PRECONDITION8CanonicalSee meaning below.
ERROR_CODE_ABORTED9CanonicalSee meaning below.
ERROR_CODE_OUT_OF_RANGE10CanonicalSee meaning below.
ERROR_CODE_UNIMPLEMENTED11CanonicalSee meaning below.
ERROR_CODE_INTERNAL12CanonicalSee meaning below.
ERROR_CODE_UNAVAILABLE13CanonicalSee meaning below.
ERROR_CODE_DATA_LOSS14CanonicalSee meaning below.
ERROR_CODE_UNAUTHENTICATED15CanonicalSee meaning below.
ERROR_CODE_MODEL_INVALID16CanonicalSee meaning below.
ERROR_CODE_MODEL_UNAVAILABLE17CanonicalSee meaning below.
ERROR_CODE_MODERATION_FLAGGED18CanonicalSee meaning below.
ERROR_CODE_GENERATION_FAILED19CanonicalSee meaning below.
ERROR_CODE_TOOL_EXECUTION_FAILED20CanonicalSee meaning below.
ERROR_CODE_UPSTREAM_PROVIDER21CanonicalSee meaning below.
ERROR_CODE_VALIDATION_EXHAUSTED22CanonicalSee meaning below.
ERROR_CODE_PAYMENT_REQUIRED23CanonicalSee meaning below.

ERROR_CODE_CANCELLED

The caller cancelled the operation before it completed.

Canonical error categories.

499 — Cancelled by caller

ERROR_CODE_UNKNOWN

The operation failed without a more specific error classification.

500 — Unknown error

ERROR_CODE_INVALID_ARGUMENT

The request contains an invalid argument or field value.

400 — Bad input, invalid field values

ERROR_CODE_DEADLINE_EXCEEDED

The operation did not complete before its deadline.

504 — Operation timed out

ERROR_CODE_NOT_FOUND

The requested resource does not exist or could not be found.

404 — Resource does not exist

ERROR_CODE_ALREADY_EXISTS

The requested creation conflicts with a resource that already exists.

409 — Resource already exists

ERROR_CODE_PERMISSION_DENIED

The authenticated caller is not permitted to perform the operation.

403 — Caller lacks permission

ERROR_CODE_RESOURCE_EXHAUSTED

A quota, rate limit or other capacity limit prevented the operation.

429 — Rate limited or quota exceeded

ERROR_CODE_FAILED_PRECONDITION

The operation requires a system or resource state that is not currently satisfied.

400 — System not in required state

ERROR_CODE_ABORTED

The operation was aborted, for example by a concurrent modification conflict.

409 — Concurrent conflict, retry may succeed

ERROR_CODE_OUT_OF_RANGE

An argument is outside the range supported by this operation.

400 — Value outside valid range

ERROR_CODE_UNIMPLEMENTED

The requested operation is not implemented.

501 — Not implemented

ERROR_CODE_INTERNAL

An internal failure prevented the operation from completing.

500 — Internal error

ERROR_CODE_UNAVAILABLE

The service or a required dependency is temporarily unavailable.

503 — Service temporarily unavailable

ERROR_CODE_DATA_LOSS

The operation encountered unrecoverable loss or corruption of data.

500 — Unrecoverable data loss

ERROR_CODE_UNAUTHENTICATED

Authentication credentials are missing or invalid.

401 — Missing or invalid credentials

ERROR_CODE_MODEL_INVALID

The requested model identifier is absent from the model catalog.

Domain-specific error categories.

400 — Model ID not found in catalog

ERROR_CODE_MODEL_UNAVAILABLE

The model exists, but no provider is currently available to serve it.

503 — Model exists but all providers are down

ERROR_CODE_MODERATION_FLAGGED

Content moderation flagged the submitted content.

403 — Input flagged by content moderation

ERROR_CODE_GENERATION_FAILED

Model generation failed after its configured attempts.

500 — LLM generation failed after retries

ERROR_CODE_TOOL_EXECUTION_FAILED

Execution of a requested tool failed.

500 — MCP tool call failed

ERROR_CODE_UPSTREAM_PROVIDER

An upstream model provider returned an error.

503 — Upstream provider returned error

ERROR_CODE_VALIDATION_EXHAUSTED

Structured-output validation still failed after the configured attempts.

500 — Structured output validation failed after all retries

ERROR_CODE_PAYMENT_REQUIRED

The account lacks the credits required for the operation.

402 — Insufficient credits

Where used​

Section ID: DOC-API-MODEL-schema-1fajlacjs0#where-used

ReferenceRelationship
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Submit client-side tool execution resultsPOST /api/v1/llm/submit-client-tool-results
Models containing this value
ModelRelationship
ClientToolResultNested in model
LLMGenerationCompletedEventNested in model
LLMGenerationCompletedEventNested in model

Download the public reference contract.

Document ID: DOC-API-MODEL-schema-1fajlacjs0