planetmint/planetmint/backend/exceptions.py
Lorenz Herzberger cddfe862ef
adjusted hashlib imports and renamed to bigchaindb error
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2022-09-27 16:34:22 +02:00

23 lines
678 B
Python

# Copyright © 2020 Interplanetary Database Association e.V.,
# Planetmint and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
from planetmint.exceptions import PlanetmintError
class BackendError(PlanetmintError):
"""Top level exception for any backend exception."""
class ConnectionError(BackendError):
"""Exception raised when the connection to the backend fails."""
class OperationError(BackendError):
"""Exception raised when a backend operation fails."""
class DuplicateKeyError(OperationError):
"""Exception raised when an insert fails because the key is not unique"""