Spaces:
Running
Running
| """Author RAG Chatbot SaaS — Exception Hierarchy. | |
| All domain exceptions inherit from AppException. | |
| HTTP mapping is done in main.py exception handlers. | |
| Never raise raw Exception or HTTPException from business logic. | |
| """ | |
| class AppException(Exception): | |
| """Base exception for all application errors.""" | |
| def __init__(self, message: str = "An unexpected error occurred") -> None: | |
| super().__init__(message) | |
| self.message = message | |
| def __str__(self) -> str: | |
| return self.message | |