gcp
Google Cloud API Error Codes
Canonical error codes used across all Google Cloud APIs, defined as google.rpc.Code in the Google Cloud API design guide. Each code maps to a gRPC status and an HTTP status, providing a unified error model for REST and gRPC surfaces.
17 codes
references cloud.google.com/apis/design/errorsgithub.com/googleapis/googleapis/blob/master/google/rpc/code.proto
· All codes 17 codes
- ABORTED Aborted The operation was aborted, typically due to a concurrency conflict such as a sequencer check failure or a transaction abort. Maps to HTTP 409. Clients may retry using exponential backoff.
- ALREADY_EXISTS Already exists The resource being created already exists. Maps to HTTP 409. Google Cloud APIs return this when a client attempts to create a resource with an identifier already in use, such as a duplicate Cloud Storage bucket name.
- CANCELLED Cancelled The operation was cancelled, typically by the caller. Maps to HTTP 499. Google Cloud APIs return this when a client cancels an in-progress request.
- DATA_LOSS Data loss Unrecoverable data loss or corruption has occurred. Maps to HTTP 500. Google Cloud APIs return this for severe errors such as irrecoverable storage corruption, which require operator intervention.
- DEADLINE_EXCEEDED Deadline exceeded The deadline expired before the operation could complete. Maps to HTTP 504. Google Cloud APIs return this when a request times out on the server side, even if the operation may have partially completed.
- FAILED_PRECONDITION Failed precondition The operation was rejected because the system is not in the required state. Maps to HTTP 400. Google Cloud APIs use this when a precondition for the operation is not met, such as attempting to delete a non-empty Cloud Storage bucket.
- INTERNAL Internal An internal server error occurred within the Google Cloud service. Maps to HTTP 500. This indicates a fault in the server's implementation and is not caused by the client request.
- INVALID_ARGUMENT Invalid argument The client specified an invalid argument, such as a malformed field value or an out-of-range integer. Maps to HTTP 400. Unlike FAILED_PRECONDITION, this indicates arguments that are problematic regardless of system state.
- NOT_FOUND Not found A requested resource was not found. Maps to HTTP 404. Google Cloud APIs use this when the specified resource does not exist, such as a missing Compute Engine instance or Cloud Storage object.
- OK OK The operation completed successfully. Maps to HTTP 200. Returned when a Google Cloud API method completes without error.
- OUT_OF_RANGE Out of range The operation was attempted past the valid range, such as reading past the end of a paginated result set. Maps to HTTP 400. Unlike INVALID_ARGUMENT, this may resolve as the system state changes.
- PERMISSION_DENIED Permission denied The authenticated caller does not have permission to execute the operation. Maps to HTTP 403. Distinct from UNAUTHENTICATED: the caller's identity is known but the IAM policy does not grant the required permission.
- RESOURCE_EXHAUSTED Resource exhausted A resource quota has been exhausted or a rate limit has been reached. Maps to HTTP 429. Google Cloud APIs return this for per-project or per-user quota violations, such as exceeding API call rate limits or storage quotas.
- UNAUTHENTICATED Unauthenticated The request does not have valid authentication credentials. Maps to HTTP 401. Google Cloud APIs return this when the request lacks a valid API key, OAuth token, or service account credential.
- UNAVAILABLE Unavailable The Google Cloud service is currently unavailable. Maps to HTTP 503. This is typically a transient condition; clients should retry with exponential backoff. Distinct from INTERNAL: the service itself is temporarily unreachable.
- UNIMPLEMENTED Unimplemented The operation is not implemented or not supported by this Google Cloud API or service. Maps to HTTP 501. Returned when a method exists in the API definition but has not been implemented by the server.
- UNKNOWN Unknown An unknown error occurred, typically from a different error domain or when a server error cannot be mapped to a known code. Maps to HTTP 500.