git-subtree-dir: apps/core git-subtree-mainline: a8963e11e7a5a0059acbc849ce768e1eee80df61 git-subtree-split: ea2a7395f4023f5b9fab03e6273db3b64a1181d5
23 lines
734 B
Python
23 lines
734 B
Python
class NoResultFound(Exception):
|
|
"""A record or records cannot be found given the provided search params"""
|
|
|
|
|
|
class MalformedIdError(Exception):
|
|
"""An id not in the right format, most likely violating uuid4 format."""
|
|
|
|
|
|
class UniqueConstraintViolationError(ValueError):
|
|
"""Custom exception for unique constraint violations."""
|
|
|
|
|
|
class ForeignKeyConstraintViolationError(ValueError):
|
|
"""Custom exception for foreign key constraint violations."""
|
|
|
|
|
|
class DatabaseTimeoutError(Exception):
|
|
"""Custom exception for database timeout issues."""
|
|
|
|
def __init__(self, message="Database operation timed out", original_exception=None):
|
|
super().__init__(message)
|
|
self.original_exception = original_exception
|