swh.storage.exc module#

exception swh.storage.exc.StorageDBError[source]#

Bases: Exception

Specific storage db error (connection, erroneous queries, etc…)

exception swh.storage.exc.StorageAPIError[source]#

Bases: Exception

Specific internal storage api (mainly connection)

exception swh.storage.exc.NonRetryableException[source]#

Bases: Exception

Persistent storage exceptions for which clients should not issue automatic retries

exception swh.storage.exc.StorageArgumentException[source]#

Bases: NonRetryableException

Argument passed to a Storage endpoint is invalid.

exception swh.storage.exc.QueryTimeout[source]#

Bases: StorageAPIError

Raised when a query to the backend (Cassandra or PostgreSQL) took too long.

exception swh.storage.exc.UnknownMetadataAuthority[source]#

Bases: StorageArgumentException

Raised when raw_extrinsic_metadata_add is called with a non-existing metadata authority as argument.

exception swh.storage.exc.UnknownMetadataFetcher[source]#

Bases: StorageArgumentException

Raised when raw_extrinsic_metadata_add is called with a non-existing metadata fetcher as argument.

exception swh.storage.exc.MaskedObjectException(masked: Dict[ExtendedSWHID, List[MaskedStatus]])[source]#

Bases: NonRetryableException

Raised when the masking proxy attempts to return a masked object

exception swh.storage.exc.HashCollision(algo, hash_id, colliding_contents)[source]#

Bases: Exception

Exception raised when a content collides in a storage backend

colliding_content_hashes() List[Dict[str, bytes]][source]#