RpcError
Standardized error payload following google.rpc.Status (AIP-193). Used across all response messages and event payloads.
Usage profiles
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
| In webhook payloads | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
code | string (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 | Machine-readable error code. Clients switch on this field. |
message | string | Optional | Human-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead. |
isTerminal | boolean | Optional | Whether 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. |
details | ErrorDetails | Optional | Structured 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.
| Value | No. | Form | Meaning |
|---|---|---|---|
ERROR_CODE_CANCELLED | 1 | Canonical | The caller cancelled the operation before it completed. |
ERROR_CODE_UNKNOWN | 2 | Canonical | The operation failed without a more specific error classification. |
ERROR_CODE_INVALID_ARGUMENT | 3 | Canonical | The request contains an invalid argument or field value. |
ERROR_CODE_DEADLINE_EXCEEDED | 4 | Canonical | The operation did not complete before its deadline. |
ERROR_CODE_NOT_FOUND | 5 | Canonical | The requested resource does not exist or could not be found. |
ERROR_CODE_ALREADY_EXISTS | 6 | Canonical | The requested creation conflicts with a resource that already exists. |
ERROR_CODE_PERMISSION_DENIED | 7 | Canonical | The authenticated caller is not permitted to perform the operation. |
ERROR_CODE_RESOURCE_EXHAUSTED | 8 | Canonical | A quota, rate limit or other capacity limit prevented the operation. |
ERROR_CODE_FAILED_PRECONDITION | 9 | Canonical | The operation requires a system or resource state that is not currently satisfied. |
ERROR_CODE_ABORTED | 10 | Canonical | The operation was aborted, for example by a concurrent modification conflict. |
ERROR_CODE_OUT_OF_RANGE | 11 | Canonical | An argument is outside the range supported by this operation. |
ERROR_CODE_UNIMPLEMENTED | 12 | Canonical | The requested operation is not implemented. |
ERROR_CODE_INTERNAL | 13 | Canonical | An internal failure prevented the operation from completing. |
ERROR_CODE_UNAVAILABLE | 14 | Canonical | The service or a required dependency is temporarily unavailable. |
ERROR_CODE_DATA_LOSS | 15 | Canonical | The operation encountered unrecoverable loss or corruption of data. |
ERROR_CODE_UNAUTHENTICATED | 16 | Canonical | Authentication credentials are missing or invalid. |
ERROR_CODE_MODEL_INVALID | 600 | Canonical | The requested model identifier is absent from the model catalog. |
ERROR_CODE_MODEL_UNAVAILABLE | 601 | Canonical | The model exists, but no provider is currently available to serve it. |
ERROR_CODE_MODERATION_FLAGGED | 602 | Canonical | Content moderation flagged the submitted content. |
ERROR_CODE_GENERATION_FAILED | 603 | Canonical | Model generation failed after its configured attempts. |
ERROR_CODE_TOOL_EXECUTION_FAILED | 604 | Canonical | Execution of a requested tool failed. |
ERROR_CODE_UPSTREAM_PROVIDER | 605 | Canonical | An upstream model provider returned an error. |
ERROR_CODE_VALIDATION_EXHAUSTED | 606 | Canonical | Structured-output validation still failed after the configured attempts. |
ERROR_CODE_PAYMENT_REQUIRED | 607 | Canonical | The account lacks the credits required for the operation. |
In responses
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
code | string (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 | Machine-readable error code. Clients switch on this field. |
message | string | Optional | Human-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead. |
isTerminal | boolean | Optional | Whether 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. |
details | ErrorDetails | Optional | Structured 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.
| Value | No. | Form | Meaning |
|---|---|---|---|
ERROR_CODE_CANCELLED | 1 | Canonical | The caller cancelled the operation before it completed. |
ERROR_CODE_UNKNOWN | 2 | Canonical | The operation failed without a more specific error classification. |
ERROR_CODE_INVALID_ARGUMENT | 3 | Canonical | The request contains an invalid argument or field value. |
ERROR_CODE_DEADLINE_EXCEEDED | 4 | Canonical | The operation did not complete before its deadline. |
ERROR_CODE_NOT_FOUND | 5 | Canonical | The requested resource does not exist or could not be found. |
ERROR_CODE_ALREADY_EXISTS | 6 | Canonical | The requested creation conflicts with a resource that already exists. |
ERROR_CODE_PERMISSION_DENIED | 7 | Canonical | The authenticated caller is not permitted to perform the operation. |
ERROR_CODE_RESOURCE_EXHAUSTED | 8 | Canonical | A quota, rate limit or other capacity limit prevented the operation. |
ERROR_CODE_FAILED_PRECONDITION | 9 | Canonical | The operation requires a system or resource state that is not currently satisfied. |
ERROR_CODE_ABORTED | 10 | Canonical | The operation was aborted, for example by a concurrent modification conflict. |
ERROR_CODE_OUT_OF_RANGE | 11 | Canonical | An argument is outside the range supported by this operation. |
ERROR_CODE_UNIMPLEMENTED | 12 | Canonical | The requested operation is not implemented. |
ERROR_CODE_INTERNAL | 13 | Canonical | An internal failure prevented the operation from completing. |
ERROR_CODE_UNAVAILABLE | 14 | Canonical | The service or a required dependency is temporarily unavailable. |
ERROR_CODE_DATA_LOSS | 15 | Canonical | The operation encountered unrecoverable loss or corruption of data. |
ERROR_CODE_UNAUTHENTICATED | 16 | Canonical | Authentication credentials are missing or invalid. |
ERROR_CODE_MODEL_INVALID | 600 | Canonical | The requested model identifier is absent from the model catalog. |
ERROR_CODE_MODEL_UNAVAILABLE | 601 | Canonical | The model exists, but no provider is currently available to serve it. |
ERROR_CODE_MODERATION_FLAGGED | 602 | Canonical | Content moderation flagged the submitted content. |
ERROR_CODE_GENERATION_FAILED | 603 | Canonical | Model generation failed after its configured attempts. |
ERROR_CODE_TOOL_EXECUTION_FAILED | 604 | Canonical | Execution of a requested tool failed. |
ERROR_CODE_UPSTREAM_PROVIDER | 605 | Canonical | An upstream model provider returned an error. |
ERROR_CODE_VALIDATION_EXHAUSTED | 606 | Canonical | Structured-output validation still failed after the configured attempts. |
ERROR_CODE_PAYMENT_REQUIRED | 607 | Canonical | The account lacks the credits required for the operation. |
In webhook payloads
Webhook JSON uses protobuf field names (snake_case).
| Field | Type | Presence | Meaning |
|---|---|---|---|
code | string (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 | Machine-readable error code. Clients switch on this field. |
message | string | Optional | Human-readable error description. Intended for developers, not end users. Must not be parsed programmatically — use code and details instead. |
is_terminal | boolean | Optional | Whether 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. |
details | ErrorDetails | Optional | Structured 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.
| Value | No. | Form | Meaning |
|---|---|---|---|
ERROR_CODE_CANCELLED | 1 | Canonical | The caller cancelled the operation before it completed. |
ERROR_CODE_UNKNOWN | 2 | Canonical | The operation failed without a more specific error classification. |
ERROR_CODE_INVALID_ARGUMENT | 3 | Canonical | The request contains an invalid argument or field value. |
ERROR_CODE_DEADLINE_EXCEEDED | 4 | Canonical | The operation did not complete before its deadline. |
ERROR_CODE_NOT_FOUND | 5 | Canonical | The requested resource does not exist or could not be found. |
ERROR_CODE_ALREADY_EXISTS | 6 | Canonical | The requested creation conflicts with a resource that already exists. |
ERROR_CODE_PERMISSION_DENIED | 7 | Canonical | The authenticated caller is not permitted to perform the operation. |
ERROR_CODE_RESOURCE_EXHAUSTED | 8 | Canonical | A quota, rate limit or other capacity limit prevented the operation. |
ERROR_CODE_FAILED_PRECONDITION | 9 | Canonical | The operation requires a system or resource state that is not currently satisfied. |
ERROR_CODE_ABORTED | 10 | Canonical | The operation was aborted, for example by a concurrent modification conflict. |
ERROR_CODE_OUT_OF_RANGE | 11 | Canonical | An argument is outside the range supported by this operation. |
ERROR_CODE_UNIMPLEMENTED | 12 | Canonical | The requested operation is not implemented. |
ERROR_CODE_INTERNAL | 13 | Canonical | An internal failure prevented the operation from completing. |
ERROR_CODE_UNAVAILABLE | 14 | Canonical | The service or a required dependency is temporarily unavailable. |
ERROR_CODE_DATA_LOSS | 15 | Canonical | The operation encountered unrecoverable loss or corruption of data. |
ERROR_CODE_UNAUTHENTICATED | 16 | Canonical | Authentication credentials are missing or invalid. |
ERROR_CODE_MODEL_INVALID | 600 | Canonical | The requested model identifier is absent from the model catalog. |
ERROR_CODE_MODEL_UNAVAILABLE | 601 | Canonical | The model exists, but no provider is currently available to serve it. |
ERROR_CODE_MODERATION_FLAGGED | 602 | Canonical | Content moderation flagged the submitted content. |
ERROR_CODE_GENERATION_FAILED | 603 | Canonical | Model generation failed after its configured attempts. |
ERROR_CODE_TOOL_EXECUTION_FAILED | 604 | Canonical | Execution of a requested tool failed. |
ERROR_CODE_UPSTREAM_PROVIDER | 605 | Canonical | An upstream model provider returned an error. |
ERROR_CODE_VALIDATION_EXHAUSTED | 606 | Canonical | Structured-output validation still failed after the configured attempts. |
ERROR_CODE_PAYMENT_REQUIRED | 607 | Canonical | The account lacks the credits required for the operation. |
Where used
| Reference | Relationship |
|---|---|
| Submit client-side tool execution results | POST /api/v1/llm/submit-client-tool-results |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| llm.generation_completed | Webhook JSON uses protobuf field names (snake_case). |
| ClientToolResult | Nested in model |
| LLMGenerationCompletedEvent | Nested in model |
Download the public reference contract.
Document: DOC-API-MODEL-rpc-error.