from fastapi import HTTPException, status class TaskNotFound(HTTPException): def __init__(self): super().__init__( status_code=status.HTTP_404_NOT_FOUND, detail="Task not found", ) class DatabaseError(HTTPException): def __init__(self, detail: str = "Database error occurred"): super().__init__( status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=detail, )