Show
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. 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. The 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. 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.
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 1xx Informational and 2xx Success codes are not discussed here. For more information, see Response Status Codes in RFC 7231 §6, RFC 7232 §4, RFC 7233 §4, RFC 7235 §3, and RFC 6585. 302—Found
303—See Other
304—Not Modified
307—Temporary Redirect
308—Resume Incomplete
400—Bad Request
401—Unauthorized
403—Forbidden
404—Not Found
405—Method Not Allowed
408—Request Timeout
409—Conflict
410—Gone
411—Length Required
412—Precondition Failed
413—Payload Too Large
416—Requested Range Not Satisfiable
429—Too Many Requests
499—Client Closed Request
500—Internal Server Error
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. 503—Service Unavailable
504—Gateway TimeoutThis 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. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Last updated 2022-08-02 UTC. [{ "type": "thumb-down", "id": "hardToUnderstand", "label":"Hard to understand" },{ "type": "thumb-down", "id": "incorrectInformationOrSampleCode", "label":"Incorrect information or sample code" },{ "type": "thumb-down", "id": "missingTheInformationSamplesINeed", "label":"Missing the information/samples I need" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }] |