Status Codes

The following document provides reference information about the error messages and status codes that Cloud Storage uses.

Error Response Format

Cloud Storage uses the standard HTTP error reporting format. Successful requests return HTTP status codes in the 2xx range. Failed requests return status codes in the 4xx and 5xx ranges. Requests that require a redirect returns status codes in the 3xx range. Error responses usually include an XML document in the response body, which contains information about the error.

The following is an example of an error response.

HTTP/1.1 409 Conflict
Content-Type: application/xml
Content-Length: 182
Date: Wed, 03 Mar 2010 00:22:00 GMT
Expires: Wed, 03 Mar 2010 00:22:00 GMT
Cache-Control: private, max-age=0

<?xml version='1.0' encoding='utf-8'?>
    The requested bucket name is not available. The bucket namespace is shared by all users
    of the system. Please select a different name and try again.

The following table describes the elements that are in the response body:

Element Description
Error Container for the error information.
Code Error name.
Message Description of the error.

Back to top

HTTP Status and Error Codes

The following are descriptions of the HTTP status and error codes that Cloud Storage uses.

301—Moved Permanently

Error Name Description
PermanentRedirect The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

304—Not Modified

Error Name Description
NotModified The resource you requested has not been modified according to the condition you specified.

307—Temporary Redirect

Error Name Description
Redirect Temporary redirect.
TemporaryRedirect You are being redirected to the bucket while DNS updates.

308—Resume Incomplete

Error Name Description
Resume Incomplete Indicates an incomplete resumable upload and provides the range of bytes already received by Cloud Storage.

400—Bad Request

Error Name Description
AmbiguousGrantByEmailAddress The e-mail address you provided is associated with more than one account.
BadDigest The Content-MD5 you specified did not match what we received.
CredentialsNotSupported This request does not support credentials.
CrcMismatch The CRC32C you specified did not match what we computed.
CustomerEncryptionAlgorithmIsInvalid Missing an encryption algorithm, or the provided algorithm is not "AE256."
CustomerEncryptionKeyFormatIsInvalid Missing an encryption key, or it is not Base64 encoded, or it does not meet the required length of the encryption algorithm.
CustomerEncryptionKeyIsIncorrect The provided encryption key is incorrect.
CustomerEncryptionKeySha256IsInvalid Missing a SHA256 hash of the encryption key, or it is not Base64 encoded, or it does not match the encryption key.
DotfulBucketNameNotUnderTld The specified bucket contains a '.' but is not under a currently recognized top-level domain.
EntityTooSmall Your proposed upload is smaller than the minimum allowed object size.
EntityTooLarge Your proposed upload exceeds the maximum allowed object size.
ExcessHeaderValues Multiple HTTP header values where one was expected.
ExpiredToken The provided token has expired.
IncompleteBody You did not provide the number of bytes specified by the Content-Length HTTP header.
IncorrectNumberOfFilesInPostRequest POST requires exactly one file upload per request.
IllegalEndpoint Upload-only and download-only endpoints may only be used for uploading or downloading object, respectively.
InlineDataTooLarge Inline data exceeds the maximum allowed size.
InvalidArgument Invalid argument.
InvalidBucketName The specified bucket is not valid.
InvalidComponentCount Composite attempted with too many or too few components.
InvalidCrc The CRC32c you specified was invalid.
InvalidDigest The Content-MD5 you specified was invalid.
InvalidDotfulBucketName The specified bucket contains a '.' but is not syntactically valid.
InvalidHash The x-goog-hash header you specified was invalid.
InvalidLocationConstraint The specified location constraint is not valid. You cannot specify locations with the Cloud Storage API.
InvalidPolicyDocument The content of the form does not meet the conditions specified in the policy document.
InvalidStorageClass The storage class you specified is not valid.
InvalidLocationConstraintStorageClassCombination This combination of location and storage class specified is not supported. In particular, regional buckets only support DURABLE_REDUCED_AVAILABILITY storage.
InvalidObjectName The specified object name is not valid.
InvalidTargetBucketForLogging The target bucket for logging does not exist, or does not grant write permission to the group "". See setting up log delivery.
InvalidToken The provided token is malformed or otherwise invalid.
InvalidURI Couldn't parse the specified URI.
KeyTooLong Your object name is too long.
MalformedACLError The XML you provided was not well-formed or did not validate against our published schema.
MalformedHeaderValue An HTTP header value was malformed.
MalformedPOSTRequest The body of your POST request is not well-formed multipart/form-data.
MalformedXML This happens when the user sends a malformed XML (XML that doesn't conform to the published XSD) for the configuration.
MaxMessageLengthExceeded Your request was too big.
MaxPostPreDataLengthExceededError Your POST request fields preceding the upload file were too large.
MetadataTooLarge Your metadata headers exceed the maximum allowed metadata size.
MissingRequestBodyError This happens when the user sends an empty XML document as a request.
MissingSecurityHeader Your request was missing a required header.
NoLoggingStatusForKey There is no such thing as a logging status sub-resource for a key.
NotImplemented A header or query you provided requested a function that is not implemented.
NoMd5Provided MD5 is required for the requested operation but was not provided.
RequestIsNotMultiPartContent Bucket POST must be of the enclosure-type multipart/form-data.
RequestTimeout Your socket connection to the server was not read from or written to within the timeout period.
ResourceIsEncryptedWithCustomerEncryptionKey The resource is encrypted with a customer-supplied encryption key, but the request did not provide one.
ResourceNotEncryptedWithCustomerEncryptionKey The resource is not encrypted with a customer-supplied encryption key, but the request provided one.
SecureConnectionRequired A secure connection is required to process this request.
TokenRefreshRequired The provided token must be refreshed.
TooManyBuckets You have attempted to create more buckets than allowed.
UnexpectedContent This request does not support content.
UnresolvableGrantByEmailAddress The e-mail address you provided does not match any account on record.
UnsupportedAcl The ACL you specified is not supported. For more information about the ACLs that Cloud Storage supports, see Access Control.
UserKeyMustBeSpecified The bucket POST must contain the specified field name. If it is specified, please check the order of the fields.

Back to top


Error Name Description

Indicates that an unauthorized request has been received by Cloud Storage.
The request header is invalid or missing.
For more information, see RFC 7235 §3.1.
The standard practice to handle this error is one or both of the following:

  1. Keep track of when you obtained the current access token and refresh it any time you find it's older than the life span returned when it was acquired (normally one hour).
  2. Catch the 401 exception, automatically acquire a new access token and retry the request.

Back to top


Error Name Description
AccessDenied Access denied.
AccountProblem There is a problem with your Google account that prevents the operation from completing successfully. One issue could be billing. Check the billing page to see if you have a past due balance or if the credit card (or other payment mechanism) on your account is expired. For project creation, see the Projects page in the Google Cloud Platform Console. For other problems, see the Resources and Support page.
AnotherUserOwnsDomain The bucket you tried to create is a domain name owned by another user.
BucketAlreadyExists The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
CrossLocationLoggingProhibited Cross location logging not allowed. A bucket in one location cannot log information to a bucket in another location.
DomainVerificationRequired The bucket you tried to create requires domain ownership verification. For more information, see Bucket and Object Naming Guidelines.
InsufficientQuota The user does not have enough quota to complete this operation.
InvalidAccessKeyId The User Id you provided does not exist in our records.
InvalidPayer All access to this object has been disabled.
InvalidSecurity The provided security credentials are not valid.
RequestTimeTooSkewed The difference between the request time and the server's time is too large.
SignatureDoesNotMatch The request signature we calculated does not match the signature you provided. Check your Google secret and signing method.

Back to top

404—Not Found

Error Name Description
AccessDenied Access denied.
NoSuchBucket The specified bucket does not exist.
NoSuchKey The specified object name does not exist.

405—Method Not Allowed

Error Name Description
AccessDenied Access denied.
MethodNotAllowed The specified method is not allowed against this resource.


Error Name Description
BucketAlreadyOwnedByYou Your previous request to create the named bucket succeeded and you already own it.
BucketNameUnavailable The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. This error can occur when you try to create a bucket name that already exists or you try to create a bucket name that does not meet the bucket naming requirements.
BucketNotEmpty The bucket you tried to delete is not empty.
OperationAborted A conflicting conditional operation is currently in progress against this resource. Please try again.
RewriteTokenDestAlreadyFinalized Attempt to call Rewrite with a RewriteToken for an already completed Rewrite operation.

411—Length Required

Error Name Description
MissingContentLength You must provide the Content-Length HTTP header.

Back to top

412—Precondition Failed

Error Name Description
PreconditionFailed At least one of the pre-conditions you specified did not hold.

416—Requested Range Not Satisfiable

Error Name Description
InvalidRange The requested range cannot be satisfied.

429—Too Many Requests

Error Name Description
SlowDown You are sending requests too frequently. In particular, bucket operations have a limit of 1 operation/second. Similarly, object operations have limits as well. There is also a per-project rate limit on how quickly you can compose an object from smaller components: approximately 200 components per second. Please wait briefly with exponential backoff before continuing, and slow down the rate at which you send requests.

500—Internal Server Error

Error Name Description
InternalError We encountered an internal error. Please wait briefly with exponential backoff before continuing.

503—Service Unavailable

Error Name Description
SlowDown The service is temporarily unavailable. Please wait briefly with exponential backoff before continuing.

Back to top

Send feedback about...

Cloud Storage