[−][src]Enum cloud_storage::Reason
Google provides a list of codes, but testing indicates that this list is not exhaustive.
Variants
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.
The conditional request would have been successful, but the condition was false, so no body was sent.
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.
Undocumeten variant that is sometimes returned by Google.
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.
The retention period on a locked bucket cannot be reduced.
Bad Cloud KMS key.
Cloud KMS key name cannot be changed.
Resource's Cloud KMS decryption key not found.
Cloud KMS key is disabled, destroyed, or scheduled to be destroyed.
Cloud KMS encryption key not found.
Cloud KMS key location not allowed.
Missing an encryption algorithm, or the provided algorithm is not "AE256."
Missing an encryption key, or it is not Base64 encoded, or it does not meet the required length of the encryption algorithm.
The provided encryption key is incorrect.
Missing a SHA256 hash of the encryption key, or it is not Base64 encoded, or it does not match the encryption key.
The value for the alt URL parameter was not recognized.
The value for one of fields in the request body was invalid.
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.
Uploads or normal API request was sent to a /download/*
path. Use the same path, but
without the /download prefix.
Downloads or normal API request was sent to an /upload/*
path. Use the same path, but
without the /upload
prefix.
Could not parse the body of the request according to the provided Content-Type.
Channel id must match the following regular expression: [A-Za-z0-9\\-_\\+/=]+
.
storage.objects.watchAll
's id property must be unique across channels.
storage.objects.watchAll
's address property must contain a valid URL.
storage.objects.watchAll
's address property must be an HTTPS URL.
A required URL parameter or required request body JSON property is missing.
The resource is encrypted with a customer-supplied encryption key, but the request did not provide one.
The resource is not encrypted with a customer-supplied encryption key, but the request provided one.
A request was made to an API version that has been turned down. Clients will need to update to a supported version.
The user project specified in the request does not match the user project specifed in an earlier, related request.
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.
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.
storage.objects.insert must be invoked as an upload rather than a metadata.
Access to a Requester Pays bucket requires authentication.
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.
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.
Requests to storage.objects.watchAll will fail unless you verify you own the domain.
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.
The Cloud Storage JSON API is restricted by law from operating with certain countries.
According 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.
According 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.
Object overwrite or deletion is not allowed due to an active hold on the object.
The Cloud Storage rate limit was exceeded. Retry using exponential backoff.
Object overwrite or deletion is not allowed until the object meets the retention period set by the retention policy on the bucket.
Requests to this API require SSL.
Calls to storage.channels.stop require that the caller own the channel.
This error implies that for the project associated with the OAuth token or the developer key provided, access to Cloud Storage JSON API is not enabled. This is most commonly because Cloud Storage JSON API is not enabled in the Google Cloud Console, though there are other cases where the project is blocked or has been deleted when this can occur.
The requester is not authorized to use the project specified in their request. The requester must have either the serviceusage.services.use permission or the Editor role for the specified project.
There 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.
The developer-specified per-user rate quota was exceeded. If you are the developer, then you can view these quotas at Quotas pane in the Google Cloud Console.
Seems to indicate the same thing
Either 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.
Either 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.
The request timed out. Please try again using truncated exponential backoff.
A request to change a resource, usually a storage..update or storage..patch 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 overwriting of other agent's changes.
You have attempted to use a resumable upload session that is no longer available. If the reported status code was not successful and you still wish to upload the file, you must start a new session.
At least one of the pre-conditions you specified did not hold.
Request violates an OrgPolicy constraint.
The Cloud Storage JSON API supports up to 5 TB objects.
This error may, alternatively, arise if copying objects between locations and/or storage
classes can not complete within 30 seconds. In this case, use the Object::rewrite
method
instead.
The requested Range cannot be satisfied.
A 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.
We encountered an internal error. Please try again using truncated exponential backoff.
We encountered an internal error. Please try again using truncated exponential backoff.
May be returned by Google, meaning undocumented.
Trait Implementations
impl Debug for Reason
[src]
impl<'de> Deserialize<'de> for Reason
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnwindSafe for Reason
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,