HTTP status and error codes for XML

The following document provides reference information about the error messages and status codes that are used in the Cloud Storage XML API. For error messages and status codes used by the Cloud Storage JSON API, see this page.

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'?> <Error> <Code>BucketNameUnavailable</Code> <Message> 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. </Message> </Error>

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

ElementDescription
ErrorContainer for the error information.
CodeError name.
MessageDescription of the error.

HTTP Status and Error Codes

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

301—Moved Permanently

Error NameDescription
PermanentRedirectThe 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 NameDescription
NotModifiedThe resource you requested has not been modified according to the condition you specified.

307—Temporary Redirect

Error NameDescription
RedirectTemporary redirect.
TemporaryRedirectYou are being redirected to the bucket while DNS updates.

308—Resume Incomplete

Error NameDescription
Resume IncompleteIndicates an incomplete resumable upload and provides the range of bytes already received by Cloud Storage.

400—Bad Request

Error NameDescription
AmbiguousGrantByEmailAddressThe e-mail address you provided is associated with more than one account.
BadDigestThe Content-MD5 or x-goog-hash you specified did not match what we received.
CloudKmsBadKeyBad Cloud KMS key.
CloudKmsCannotChangeKeyNameCloud KMS key name cannot be changed.
CloudKmsDecryptionKeyNotFoundResource's Cloud KMS decryption key not found.
CloudKmsDisabledKeyCloud KMS key is disabled, destroyed, or scheduled to be destroyed.
CloudKmsEncryptionKeyNotFoundCloud KMS encryption key not found.
CloudKmsKeyLocationNotAllowedCloud KMS key location not allowed.
CredentialsNotSupportedThis request does not support credentials.
CrcMismatchThe CRC32C you specified did not match what we computed.
CustomerEncryptionAlgorithmIsInvalidMissing an encryption algorithm, or the provided algorithm is not "AE256."
CustomerEncryptionKeyFormatIsInvalidMissing an encryption key, or it is not Base64 encoded, or it does not meet the required length of the encryption algorithm.
CustomerEncryptionKeyIsIncorrectThe provided encryption key is incorrect.
CustomerEncryptionKeySha256IsInvalidMissing a SHA256 hash of the encryption key, or it is not Base64 encoded, or it does not match the encryption key.
DotfulBucketNameNotUnderTldThe specified bucket contains a '.' but is not under a currently recognized top-level domain.
EntityTooSmallYour proposed upload is smaller than the minimum allowed object size.
EntityTooLargeYour proposed upload exceeds the maximum allowed object size.
ExcessHeaderValuesMultiple HTTP header values where one was expected.
ExpiredTokenThe provided token has expired.
IncompleteBodyYou did not provide the number of bytes specified by the Content-Length HTTP header.
IncorrectNumberOfFilesInPostRequestPOST requires exactly one file upload per request.
IllegalEndpointUpload-only and download-only endpoints may only be used for uploading or downloading object, respectively.
InlineDataTooLargeInline data exceeds the maximum allowed size.
InvalidArgumentInvalid argument.
InvalidAuthenticationThe authentication header provided in the request is not supported or is invalid.
InvalidBucketNameThe specified bucket is not valid.
InvalidComponentCountComposite attempted with too many or too few components in the request.
InvalidCrcThe CRC32c you specified was invalid.
InvalidDigestThe Content-MD5 you specified was invalid.
InvalidDotfulBucketNameThe specified bucket contains a '.' but is not syntactically valid.
InvalidHashThe x-goog-hash header you specified was invalid.
InvalidLocationConstraintThe specified location constraint is not valid. You cannot specify locations with the Cloud Storage API.
InvalidPartOne or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not match the part's entity tag.
InvalidPartOrderThe parts list given in the request to complete a multipart upload is invalid. The parts list must be in ascending order by part number.
InvalidPolicyDocumentThe content of the form does not meet the conditions specified in the policy document.
InvalidStorageClassThe storage class you specified is not valid.
InvalidLocationConstraintStorageClassCombinationThe combination of location and storage class specified is not supported. For example, buckets in regions cannot use the MULTI_REGIONAL storage class, and buckets in multi-regions cannot use the REGIONAL storage class.
InvalidObjectNameThe specified object name is not valid.
InvalidTargetBucketForLoggingThe target bucket for logging does not exist, or does not grant write permission to the group "[email protected]". See setting up log delivery.
InvalidTokenThe provided token is malformed or otherwise invalid.
InvalidURICouldn't parse the specified URI.
KeyTooLongYour object name is too long.
MalformedACLErrorThe XML you provided was not well-formed or did not validate against our published schema.
MalformedHeaderValueAn HTTP header value was malformed.
MalformedPOSTRequestThe body of your POST request is not well-formed multipart/form-data.
MalformedXMLThis happens when the user sends a malformed XML (XML that doesn't conform to the published XSD) for the configuration.
MaxMessageLengthExceededYour request was too big.
MaxPostPreDataLengthExceededErrorYour POST request fields preceding the upload file were too large.
MetadataTooLargeYour metadata headers exceed the maximum allowed metadata size.
MissingRequestBodyErrorThis happens when the user sends an empty XML document as a request.
MissingSecurityHeaderYour request was missing a required header.
NoLoggingStatusForKeyThere is no such thing as a logging status sub-resource for a key.
NotImplementedA header or query you provided requested a function that is not implemented.
NoMd5ProvidedMD5 is required for the requested operation but was not provided.
RequestIsNotMultiPartContentBucket POST must be of the enclosure-type multipart/form-data.
RequestTimeoutYour socket connection to the server was not read from or written to within the timeout period.
ResourceIsEncryptedWithCustomerEncryptionKeyThe resource is encrypted with a customer-supplied encryption key, but the request did not provide one.
ResourceNotEncryptedWithCustomerEncryptionKeyThe resource is not encrypted with a customer-supplied encryption key, but the request provided one.
SecureConnectionRequiredA secure connection is required to process this request.
TokenRefreshRequiredThe provided token must be refreshed.
UnexpectedContentThis request does not support content.
UnresolvableGrantByEmailAddressThe e-mail address you provided does not match any account on record.
UnsupportedAclThe ACL you specified is not supported. For more information about the ACLs that Cloud Storage supports, see Access Control.
UserKeyMustBeSpecifiedThe bucket POST must contain the specified field name. If it is specified, please check the order of the fields.
UserProjectInvalidThe user project specified in the request is invalid, either because it is a malformed project id or because it refers to a non-existent project.
UserProjectMissingThe requested bucket has Requester Pays enabled, the requester is not an owner of the bucket, and no user project was present in the request.

401—Unauthorized

Error NameDescription
AccountProblemAccess to Google Cloud using this account is disabled or restricted. Contact your Organization Administrator for access.
AuthenticationRequiredThe requested access requires an authentication credential, but no credential was provided as part of the request. Retry the request with a valid credential.
AuthenticationRequiredRequesterPaysAccess to a Requester Pays bucket requires authentication.
InvalidAuthenticationThe authentication credential provided in the request has expired. Reauthenticate and retry the request with the refreshed credential.

403—Forbidden

Error NameDescription
AccessDeniedAccess denied. This applies to any object you don't have access to, regardless of whether or not the object actually exists.
AccountProblemThere is a problem with your user 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.
AnotherUserOwnsDomainThe bucket you tried to create is a domain name owned by another user.
BucketAlreadyExistsThe 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.
CrossLocationLoggingProhibitedCross location logging not allowed. A bucket in one location cannot log information to a bucket in another location.
DomainVerificationRequiredThe bucket you tried to create requires domain ownership verification.
InsufficientQuotaThe user does not have enough quota to complete this operation.
InvalidAccessKeyIdThe User Id you provided does not exist in our records.
InvalidPayerAll access to this object has been disabled.
InvalidSecurityThe provided security credentials are not valid.
ObjectUnderActiveHoldObject replacement or deletion is not allowed due to an active hold on the object.
RequestTimeTooSkewedThe difference between the request time and the server's time is too large. For a request that uses a signature in its Authorization header, the maximum difference in time allowed between the request and the backend system time is 15 minutes.
RetentionPolicyNotMetObject replacement or deletion is not allowed until the object meets the retention period set by the retention policy on the bucket.
SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your Google secret and signing method.
The requester is not authorized to use the project specified in the x-goog-user-project header of their request. The requester must have the serviceusage.services.use permission for the specified project.
UserProjectAccountProblemThere is a problem with the project used in the request 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 console.

404—Not Found

Error NameDescription
NoSuchBucketThe specified bucket does not exist.
NoSuchKeyThe specified object name does not exist.
NoSuchUploadThe specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.

405—Method Not Allowed

Error NameDescription
AccessDeniedAccess denied.
MethodNotAllowedThe specified method is not allowed against this resource.

408—Request Timeout

Error NameDescription
uploadBrokenConnectionThe request timed out. Retry using exponential backoff.

409—Conflict

Error NameDescription
BucketAlreadyOwnedByYouYour previous request to create the named bucket succeeded and you already own it.
BucketNameUnavailableThe 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.
BucketNotEmptyThe bucket you tried to delete is not empty.
OperationAbortedA conflicting conditional operation is currently in progress against this resource. Please try again.
RewriteTokenDestAlreadyFinalizedAttempt to call Rewrite with a RewriteToken for an already completed Rewrite operation.

411—Length Required

Error NameDescription
MissingContentLengthYou must provide the Content-Length HTTP header.

412—Precondition Failed

Error NameDescription
PreconditionFailedAt least one of the pre-conditions you specified did not hold.

413—Payload Too Large

Error NameDescription
EntityTooLargeThe copy request took longer than 30 seconds to complete and involved an object larger than 2.5 GiB.

416—Requested Range Not Satisfiable

Error NameDescription
InvalidRangeThe requested range cannot be satisfied.

429—Too Many Requests

Error NameDescription
CloudEkmNetworkingErrorThe Cloud Storage service agent encountered an external networking error when accessing the Cloud KMS in Cloud EKM. Retry later; if the issue persists, contact your external key manager.
InsufficientQuotaThe App Engine rate limit was exceeded. Retry using exponential backoff.
LroLimitExceededThe number of running LROs of this type exceeds the limit. Cancel existing LROs or wait for them to complete and then retry.
RateLimitExceededThe Cloud Storage rate limit was exceeded. Retry using exponential backoff.
SlowDownYou are sending requests too frequently. For example, object updates have a limit of approximately 1 update/second. For additional information, see Limits and quotas. Slow down the rate at which you send requests and retry using exponential backoff.

500—Internal Server Error

Error Name (if present)Description
InternalErrorWe encountered an internal error. Retry using exponential backoff.

503—Service Unavailable

Error Name (if present)Description
SlowDownThe service is temporarily unavailable. Retry using exponential backoff.

504—Gateway Timeout

Error NameDescription
N/AThe service is temporarily unable to reach another service. Retry using exponential backoff.