"""
ChatGPT Automation Exceptions

Custom exception types for different failure modes.
"""


class ChatGPTError(Exception):
    """Base exception for ChatGPT automation."""
    pass


class ChatGPTSessionExpired(ChatGPTError):
    """Session expired, manual login required."""
    pass


class ChatGPTRateLimited(ChatGPTError):
    """Rate limit hit, includes retry_after if available."""

    def __init__(self, message: str, retry_after: int = None):
        super().__init__(message)
        self.retry_after = retry_after


class ChatGPTDOMChanged(ChatGPTError):
    """DOM structure changed, selectors need update."""
    pass


class ChatGPTTimeout(ChatGPTError):
    """Response timeout exceeded."""
    pass
