Cloud Storage Errors and Error Handling Stay organized with collections Save and categorize content based on your preferences.
Google Cloud Storage is accessed by the App Engine UrlFetch feature. As a result,there are three sources of possible errors:
- App Engine UrlFetch transient errors.
- Google Cloud Storage transient errors.
- Google Cloud Storage errors related to buckets and object authorization.
The App Engine client library for Cloud Storage handles timeout errors on both the App Engine side andthe Google Cloud Storage side and performs retries automatically, so your app does not need toadd logic to handle this. The configuration of the timeout and retry mechanismis exposed through theRetryParamsclass, which you can use to change any or all of the default settings. You canmake your changes to apply to all function calls or you can specify changes fora specific call using the function'sretry_params parameter.
Errors
The App Engine client library for Cloud Storage has the following error exception classes defined:
- cloudstorage.Error
The base class for all exceptions in this package. Errors can begenerated from App Engine or from Google Cloud Storage. For details on HTTPerror codes from Google Cloud Storage, seeHTTP Status and ErrorCodes in the Google Cloud Storage documentation.
- cloudstorage.AuthorizationError
- An unauthorized request was received by Google Cloud Storage. This error can occur if anauthorized app is using an access token that has expired. Normally, this erroris handled automatically in the App Engine client library for Cloud Storage, which gets a new access tokenand retries the request.
- cloudstorage.ForbiddenError
This error (403) indicates that the user was not authorized by Google Cloud Storage tomake the request.
- The various possible causes for this error are listed in theGoogle Cloud Storage errordocumentation for403-Forbidden.
- A common source of this error isthat the bucket permissions (bucket ACL) are not set properly to allow your appaccess. SeeGoogle Cloud Storage Authenticationfor information on setting up access.
- cloudstorage.NotFoundError
- HTTP error 404. The bucket or object you specified in a call to
cloudstorage.delete(),cloudstorage.listbucket(),cloudstorage.open(), orcloudstorage.stat()does not exist. - cloudstorage.TimeoutError
- This error is raised when the attempt to contact Google Cloud Storage servers times out evenafter retry attempts. (SeeRetryParamsfor information on changing the default timeout handling and retries.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.