20191222

HTTP status and error codes for JSON

【外部リンク】
https://cloud.google.com/storage/docs/json_api/v1/status-codes
HTTP status and error codes for JSON



The following examples show some common errors. Note that the header information in the responses is omitted.

401 UNAUTHORIZED
403 FORBIDDEN
404 NOT FOUND
409 CONFLICT

lement Description
code An HTTP status code value, without the textual description.

Example values include: 400 (Bad Request), 401 (Unauthorized), and 404 (Not Found).
error A container for the error information.
errors A container for the error details.
errors.domain The scope of the error. Example values include: global, push, and usageLimits.
errors.location The specific item within the locationType that caused the error. For example, if you specify an invalid value for a parameter, the location will be the name of the parameter.

Example values include: Authorization, project, and projection.
errors.locationType The location or part of the request that caused the error. Use with location to pinpoint the error. For example, if you specify an invalid value for a parameter, the locationType will be parameter and the location will be the name of the parameter.


フィードバックを送信
Storage Products
Cloud Storage
Documentation
Reference
HTTP status and error codes for JSON
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 Format
Cloud 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.

401 UNAUTHORIZED403 FORBIDDEN404 NOT FOUND409 CONFLICT
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.

401 Unauthorized

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "required",
   "message": "Login Required",
   "locationType": "header",
   "location": "Authorization"
  }
 ],
 "code": 401,
 "message": "Login Required"
 }
}
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.

Element Description
code An HTTP status code value, without the textual description.

Example values include: 400 (Bad Request), 401 (Unauthorized), and 404 (Not Found).
error A container for the error information.
errors A container for the error details.
errors.domain The scope of the error. Example values include: global, push, and usageLimits.
errors.location The specific item within the locationType that caused the error. For example, if you specify an invalid value for a parameter, the location will be the name of the parameter.

Example values include: Authorization, project, and projection.
errors.locationType The location or part of the request that caused the error. Use with location to pinpoint the error. For example, if you specify an invalid value for a parameter, the locationType will be parameter and the location will be the name of the parameter.

Example values include header and parameter.
errors.message Description of the error.

Example values include Invalid argument, Login required, and Required parameter: project.
errors.reason Example values include invalid, invalidParameter, and required.
message Description of the error. Same as errors.message.
HTTP Status and Error Codes
This 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
Reason Description
found Resource temporarily located elsewhere according to the Location header.
303—See Other
Reason Description
mediaDownloadRedirect When requesting a download using alt=media URL parameter, the direct URL path to use is prefixed by /download. If this is omitted, the service will issue this redirect with the appropriate media download path in the Location header.
304—Not Modified


フィードバックを送信
Storage Products
Cloud Storage
Documentation
Reference
HTTP status and error codes for JSON
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 Format
Cloud 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.

401 UNAUTHORIZED403 FORBIDDEN404 NOT FOUND409 CONFLICT
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.

401 Unauthorized

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "required",
   "message": "Login Required",
   "locationType": "header",
   "location": "Authorization"
  }
 ],
 "code": 401,
 "message": "Login Required"
 }
}
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.

Element Description
code An HTTP status code value, without the textual description.

Example values include: 400 (Bad Request), 401 (Unauthorized), and 404 (Not Found).
error A container for the error information.
errors A container for the error details.
errors.domain The scope of the error. Example values include: global, push, and usageLimits.
errors.location The specific item within the locationType that caused the error. For example, if you specify an invalid value for a parameter, the location will be the name of the parameter.

Example values include: Authorization, project, and projection.
errors.locationType The location or part of the request that caused the error. Use with location to pinpoint the error. For example, if you specify an invalid value for a parameter, the locationType will be parameter and the location will be the name of the parameter.

Example values include header and parameter.
errors.message Description of the error.

Example values include Invalid argument, Login required, and Required parameter: project.
errors.reason Example values include invalid, invalidParameter, and required.
message Description of the error. Same as errors.message.
HTTP Status and Error Codes
This 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
Reason Description
found Resource temporarily located elsewhere according to the Location header.
303—See Other
Reason Description
mediaDownloadRedirect When requesting a download using alt=media URL parameter, the direct URL path to use is prefixed by /download. If this is omitted, the service will issue this redirect with the appropriate media download path in the Location header.
304—Not Modified
Reason Description
notModified The conditional request would have been successful, but the condition was false, so no body was sent.
307—Temporary Redirect
Reason Description
temporaryRedirect Resource temporarily located elsewhere according to the Location 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 Incomplete
Description
Indicates 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.]Reason Description
badRequest The 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 Bucket Policy Only enabled.
badRequestException The retention period on a locked bucket cannot be reduced.
cloudKmsBadKey Bad Cloud KMS key.
cloudKmsCannotChangeKeyName Cloud KMS key name cannot be changed.
cloudKmsDecryptionKeyNotFound Resource's Cloud KMS decryption key not found.
cloudKmsDisabledKey Cloud KMS key is disabled, destroyed, or scheduled to be destroyed.
cloudKmsEncryptionKeyNotFound Cloud KMS encryption key not found.
cloudKmsKeyLocationNotAllowed Cloud KMS key location not allowed.
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.
invalidAltValue The value for the alt URL parameter was not recognized.
invalidArgument The value for one of fields in the request body was invalid.
invalidParameter The 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 alt parameter that is not json.
notDownload Uploads or normal API request was sent to a /download/* path. Use the same path, but without the /download prefix.
notUpload Downloads or normal API request was sent to a /upload/* path. Use the same path, but without the /upload prefix.
parseError Could not parse the body of the request according to the provided Content-Type.
push.channelIdInvalid Channel id must match the following regular expression: [A-Za-z0-9\\-_\\+/=]+
push.channelIdNotUnique storage.objects.watchAll's id property must be unique across channels.
push.webhookUrlNoHostOrAddress storage.objects.watchAll's address property must contain a valid URL.
push.webhookUrlNotHttps storage.objects.watchAll's address property must be an HTTPS URL.
required A required URL parameter or required request body JSON property is missing.
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.
turnedDown A request was made to an API version that has been turned down. Clients will need to update to a supported version.
userProjectInconsistent The user project specified in the request does not match the user project specifed in an earlier, related request.
userProjectInvalid The 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.
userProjectMissing The requested bucket has Requester Pays enabled, the requester is not an owner of the bucket, and no user project was present in the request.
wrongUrlForUpload storage.objects.insert must be invoked as an upload rather than a metadata.
401—Unauthorized
[Domain.]Reason Description
AuthenticationRequiredRequesterPays Access to a Requester Pays bucket requires authentication.
authError This error indicates a problem with the authorization provided in the request to Cloud Storage. The following are some situations where that will occur:
The OAuth access token has expired and needs to be refreshed. This can be avoided by refreshing the access token early, but code can also catch this error, refresh the token and retry automatically.
Multiple non-matching authorizations were provided; choose one mode only.
The OAuth access token's bound project does not match the project associated with the provided developer key.
The Authorization header was of an unrecognized format or uses an unsupported credential type.
lockedDomainExpired When downloading content from a cookie-authenticated site, e.g., using the Storage Browser, the response will redirect to a temporary domain. This error will occur if access to said domain occurs after the domain expires. Issue the original request again, and receive a new redirect.
push.webhookUrlUnauthorized Requests to storage.objects.watchAll will fail unless you verify you own the domain.
required Access to a non-public method that requires authorization was made, but none was provided in the Authorization header or through other means.
403—Forbidden
[Domain.]Reason Description
accountDisabled The 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.
countryBlocked The Cloud Storage JSON API is restricted by law from operating with certain countries.





【外部リンク】
https://developers.google.com/cast/docs/caf_receiver/error_codes
CAF error codes
Error codes related to the CAF framework sent by error events or media error messages.

Name Code Description Solution
APP 900 Returned when an error occurs outside of the framework (e.g., if an event handler throws an error). Investigate the error that is outside the cast framework.
BREAK_CLIP_LOADING_ERROR 901 Returned when break clip load interceptor fails. Examine the contents of the break clips.
BREAK_SEEK_INTERCEPTOR_ERROR 902 Returned when break seek interceptor fails.

--

注目の投稿

cURL error 60: SSL certificate problem: unable to get local issuer certificate

cURL error 60: SSL certificate problem: unable to get local issuer certificate 更新失敗: ダウンロードに失敗しました。 cURL error 60: SSL certificate problem: ...

人気の投稿