Arag / app /exceptions /base.py
AuthorBot
Restructure project for HF Spaces deployment
772f852
Raw
History Blame Contribute Delete
512 Bytes
"""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