Stor Python Exceptions¶
Provides exceptions classes thrown by various utilities of stor
- 
exception stor.exceptions.RemoteError(message, caught_exception=None)[source]¶
- The top-level exception thrown for any errors from remote services (eg. swift, S3). - The ‘caught_exception’ attribute of the exception must be examined in order to inspect the exception thrown by the swift or S3 service. A swift exception - Swift has two types of caught exceptions: - SwiftError(thrown by- swiftclient.service)
- ClientError(thrown by- swiftclient.client)
 - S3 raises: - ClientError(thrown by- botocore.client).
 
- 
exception stor.exceptions.NotFoundError(message, caught_exception=None)[source]¶
- Thrown when a 404 response is returned. 
- 
exception stor.exceptions.InvalidObjectStateError(message, caught_exception=None)[source]¶
- Base class for 403 errors from S3 dealing with storage classes. 
- 
exception stor.exceptions.ObjectInColdStorageError(message, caught_exception=None)[source]¶
- Thrown when a 403 is returned from S3/SwiftStack because backing data is on Glacier. - Note - We don’t want to retry on this one, because the object will always be in cold storage. See AWS S3 Rest API GET spec for more details. 
- 
exception stor.exceptions.AlreadyRestoredError(message, caught_exception=None)[source]¶
- Thrown on attempt to restore object already not in Glacier 
- Thrown when a 403 response is returned. - Note - Internal swift connection errors (e.g., when a particular node is unavailable) appear to translate themselves into 403 errors at the proxy layer, thus in general it’s a good idea to retry on authorization errors as equivalent to unavailable errors when doing PUT or GET operations (list / stat / etc never hit this issue). 
- Thrown when a 503 response is returned. 
- 
exception stor.exceptions.ConflictError(message, caught_exception=None)[source]¶
- Thrown when a 409 response is returned. - Notes - Swift: This error is thrown when deleting a container and some object storage nodes report that the container has objects while others don’t. 
- S3: Raised when attempting to restore object that’s already being restored (as RestoreAlreadyInProgressError). Possibly in other cases. 
 
- 
exception stor.exceptions.TargetExistsError(message, caught_exception=None)[source]¶
- Thrown when a destination target already exists on DX for a folder that is being uploaded/copied/moved, etc. 
- 
exception stor.exceptions.RestoreAlreadyInProgressError(message, caught_exception=None)[source]¶
- Thrown when RestoreAlreadyInProgress on glacier restore 
- 
exception stor.exceptions.ConditionNotMetError(message, caught_exception=None)[source]¶
- Thrown when a condition is not met. 
- 
exception stor.exceptions.FailedTransferError(message, caught_exception=None)[source]¶
- Thrown when a file transfer fails.