__init__.py
 1  """
 2  Exception types and handlers for consistent error handling.
 3  
 4  Provides:
 5  - Business exception types (ValidationError, EntityNotFoundError, etc.)
 6  - FastAPI exception handlers
 7  - Error DTOs for API responses
 8  """
 9  
10  from .exceptions import (
11      WebUIBackendException,
12      ValidationError,
13      EntityNotFoundError,
14      EntityAlreadyExistsError,
15      BusinessRuleViolationError,
16      ConfigurationError,
17      DataIntegrityError,
18      ExternalServiceError,
19      InternalServiceError,
20      EntityOperation,
21  )
22  from .exception_handlers import register_exception_handlers
23  from .error_dto import EventErrorDTO
24  
25  __all__ = [
26      "WebUIBackendException",
27      "ValidationError",
28      "EntityNotFoundError",
29      "EntityAlreadyExistsError",
30      "BusinessRuleViolationError",
31      "ConfigurationError",
32      "DataIntegrityError",
33      "ExternalServiceError",
34      "InternalServiceError",
35      "EntityOperation",
36      "register_exception_handlers",
37      "EventErrorDTO",
38  ]