Spaces:
Sleeping
Sleeping
Download app/core/exceptions.py from pgits/voiceCal-ai: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/spaces/pgits/voiceCal-ai/resolve/main/app/core/exceptions.py
- Command line
-
hf download hf://spaces/pgits/voiceCal-ai/app/core/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/pgits/voiceCal-ai/resolve/main/app/core/exceptions.py
1.08 kB
| """Custom exceptions for ChatCal.ai application.""" | |
| from typing import Optional, Dict, Any | |
| class ChatCalException(Exception): | |
| """Base exception for ChatCal.ai application.""" | |
| def __init__(self, message: str, details: Optional[Dict[str, Any]] = None): | |
| self.message = message | |
| self.details = details or {} | |
| super().__init__(self.message) | |
| class AuthenticationError(ChatCalException): | |
| """Raised when authentication fails.""" | |
| pass | |
| class CalendarError(ChatCalException): | |
| """Raised when calendar operations fail.""" | |
| pass | |
| class LLMError(ChatCalException): | |
| """Raised when LLM operations fail.""" | |
| pass | |
| class ValidationError(ChatCalException): | |
| """Raised when input validation fails.""" | |
| pass | |
| class RateLimitError(ChatCalException): | |
| """Raised when API rate limits are exceeded.""" | |
| pass | |
| class ServiceUnavailableError(ChatCalException): | |
| """Raised when external services are unavailable.""" | |
| pass | |
| class ConfigurationError(ChatCalException): | |
| """Raised when configuration is invalid.""" | |
| pass |