Which one of the following S3 error code does not have a corresponding HTTP 404 status code?
The following document provides reference information about the status codes and error messages that are used in the Cloud Storage JSON API. For the page specific to the Cloud Storage XML API, see HTTP status and error codes for XML. Show
Error Response FormatCloud Storage uses the standard HTTP error reporting format for the JSON API. 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 a JSON document in the response body, which contains information about the error. The following examples show some common errors. Note that the header information in the responses is omitted. The following is an example of an error response you receive if you try to list the buckets for a project but do not provide an authorization header. This is an example of an error response you receive if you try to list the buckets of a non-existent project or one in which you don't have permission to list buckets. The following is an example of an error response you receive if you try to retrieve an object that does not exist. 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } } 409 ConflictThe following is an example of an error response you receive if you try to create a bucket using the name of a bucket you already own. 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } } The following table describes the elements that can appear in the response body of an error. Fields should be used together to help determine the problem. Also, the example values given below are meant for illustration and are not an exhaustive list of all possible values. code An HTTP status code value, without the textual description.Example values include: 400 (Bad Request), 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }0 (Unauthorized), and 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }1 (Not Found). 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }2A container for the error information. 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }3A container for the error details.errors. 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }4The scope of the error. Example values include: 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }5 and 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }6.errors. 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }7The specific item within the 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }8 that caused the error. For example, if you specify an invalid value for a parameter, the 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }7 will be the name of the parameter. Example values include: 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } }0, 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } }1, and 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } }2.errors. 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }8The location or part of the request that caused the error. Use with 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }7 to pinpoint the error. For example, if you specify an invalid value for a parameter, the 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }8 will be 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } }6 and the 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }7 will be the name of the parameter. Example values include 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } }8 and 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } }6.errors. 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }0Description of the error. Example values include 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }1, 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }2, and 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }3.errors. 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }4Example values include 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }5, 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }6, and 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }7. 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }0Description of the error. Same as errors. 409 Conflict { "error": { "errors": [ { "domain": "global", "reason": "conflict", "message": "You already own this bucket. Please select another name." } ], "code": 409, "message": "You already own this bucket. Please select another name." } }0. HTTP Status and Error CodesThis section provides a non-exhaustive list of HTTP status and error codes that the Cloud Storage JSON API uses. The 302—FoundReasonDescriptionfoundResource temporarily located elsewhere according to the401 Unauthorized 2 header.303—See OtherReasonDescriptionmediaDownloadRedirectWhen requesting a download using401 Unauthorized 3 URL parameter, the direct URL path to use is prefixed by 401 Unauthorized 4. If this is omitted, the service will issue this redirect with the appropriate media download path in the 401 Unauthorized 2 header.304—Not ModifiedReasonDescriptionnotModifiedThe conditional request would have been successful, but the condition was false, so no body was sent.307—Temporary RedirectReasonDescriptiontemporaryRedirectResource temporarily located elsewhere according to the401 Unauthorized 2 header. Among other reasons, this can occur when cookie-based authentication is being used, e.g., when using the Storage Browser, and it receives a request to download content.308—Resume IncompleteDescriptionIndicates an incomplete resumable upload and provides the range of bytes already received by Cloud Storage. Responses with this status do not contain a body.400—Bad Request[Domain.]ReasonDescriptionbadRequestThe request cannot be completed based on your current Cloud Storage settings. For example, you cannot lock a retention policy if the requested bucket doesn't have a retention policy, and you cannot set ACLs if the requested bucket has uniform bucket-level access enabled.badRequestExceptionThe retention period on a locked bucket cannot be reduced.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.corsRequestWithXOriginCORS request contains an XD3 X-Origin header.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.invalidAltValueThe value for the401 Unauthorized 7 URL parameter was not recognized.invalidArgumentThe value for one of fields in the request body was invalid.invalidParameterThe value for one of the URL parameters was invalid. In addition to normal URL parameter validation, any URL parameters that have a corresponding value in provided JSON request bodies must match if they are both specified. If using JSONP, you will get this error if you provide an 401 Unauthorized 7 parameter that is not 401 Unauthorized 9.notDownloadUploads or normal API request was sent to a 403 Forbidden 0 path. Use the same path, but without the 401 Unauthorized 4 prefix.notUploadDownloads or normal API request was sent to a 403 Forbidden 2 path. Use the same path, but without the 403 Forbidden 3 prefix.parseErrorCould not parse the body of the request according to the provided Content-Type.push.channelIdInvalidChannel id must match the following regular expression: 403 Forbidden 4push.channelIdNotUnique403 Forbidden 5's 403 Forbidden 6 property must be unique across channels.push.webhookUrlNoHostOrAddress403 Forbidden 5's 403 Forbidden 8 property must contain a valid URL.push.webhookUrlNotHttps403 Forbidden 5's 403 Forbidden 8 property must be an HTTPS URL.requiredA required URL parameter or required request body JSON property is missing.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.turnedDownA request was made to an API version that has been turned down. Clients will need to update to a supported version.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.wrongUrlForUpload404 Not Found 1 must be invoked as an upload rather than a metadata.401—Unauthorized[Domain.]ReasonDescriptionAuthenticationRequiredRequesterPaysAccess to a Requester Pays bucket requires authentication.authErrorThis error indicates a problem with the authorization provided in the request to Cloud Storage. The following are some situations where that will occur:
403—Forbidden[Domain.]ReasonDescriptionaccountDisabledThe account associated with the project that owns the bucket or object has been disabled. Check the Google Cloud console to see if there is a problem with billing, and if not, contact account support.countryBlockedThe Cloud Storage JSON API is restricted by law from operating with certain countries.forbiddenAccording to access control policy, the current user does not have access to perform the requested action. This code applies even if the resource being acted on doesn't exist.insufficientPermissionsAccording to access control policy, the current user does not have access to perform the requested action. This code applies even if the resource being acted on doesn't exist.objectUnderActiveHoldObject replacement or deletion is not allowed due to an active hold on the object.retentionPolicyNotMetObject replacement or deletion is not allowed until the object meets the retention period set by the retention policy on the bucket.sslRequiredRequests to this API require SSL.stopChannelCallerNotOwnerCalls to404 Not Found 2 require that the caller own the channel.UserProjectAccessDeniedThe requester is not authorized to use the project specified in the 404 Not Found 3 portion of the request. The requester must have the 404 Not Found 4 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. For other problems, see the Resources and Support page.404—Not FoundReasonDescriptionnotFoundEither there is no API method associated with the URL path of the request, or the request refers to one or more resources that were not found.405—Method Not AllowedReasonDescriptionmethodNotAllowedThe HTTP verb is not supported by the URL endpoint used in the request. This can happen, for example, when using the wrong verb with the403 Forbidden 3 or 401 Unauthorized 4 URLs.408—Request TimeoutReasonDescriptionuploadBrokenConnectionThe request timed out. Please try again using truncated exponential backoff.409—ConflictReasonDescriptionconflictA request to change a resource, usually a404 Not Found 7 or 404 Not Found 8 method, failed to commit the change due to a conflicting concurrent change to the same resource. The request can be retried, though care should be taken to consider the new state of the resource to avoid blind replacement of another agent's changes.410—GoneDescriptionYou have attempted to use a resumable upload session or rewrite token that is no longer available. If the reported status code was not successful and you still wish to complete the upload or rewrite, you must start a new session.411—Length RequiredDescriptionYou must provide the Content-Length HTTP header. This error has no response body.412—Precondition FailedReasonDescriptionconditionNotMetAt least one of the pre-conditions you specified did not hold.orgPolicyConstraintFailedRequest violates an OrgPolicy constraint.413—Payload Too LargeReasonDescriptionuploadTooLargeThis error arises if you:
416—Requested Range Not SatisfiableReasonDescriptionrequestedRangeNotSatisfiableThe requested Range cannot be satisfied.429—Too Many Requests[Domain.]ReasonDescriptionusageLimits.rateLimitExceededA Cloud Storage JSON API usage limit was exceeded. If your application tries to use more than its limit, additional requests will fail. Throttle your client's requests, and/or use truncated exponential backoff.499—Client Closed RequestDescriptionThe resumable upload was cancelled at the client's request prior to completion. This error has no response body.500—Internal Server ErrorReasonDescriptionbackendErrorWe encountered an internal error. Please try again using truncated exponential backoff.internalErrorWe encountered an internal error. Please try again using truncated exponential backoff.502—Bad GatewayThis error is generated when there was difficulty reaching an internal service. It is not formatted with a JSON document. Please try again using truncated exponential backoff. Which of the following is an incorrect S3 bucket name?The bucket name cannot contain underscores, end with a dash, have consecutive periods, or use dashes adjacent to periods. The bucket name cannot be formatted as an IP address (198.51. 100.24).
Can you access S3 over HTTP?S3 access points don't support access by HTTP, only secure access by HTTPS.
What HTTP response code will you receive after a successful upload to an S3 bucket?HTTP 200 code indicates a successful write to S3.
Why is my S3 URL Access Denied?If you're trying to host a static website using Amazon S3, but you're getting an Access Denied error, check the following requirements: Objects in the bucket must be publicly accessible. S3 bucket policy must allow access to the s3:GetObject action. The AWS account that owns the bucket must also own the object.
|