Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.1 KB
Raw Blame
"""
Exceptions for the notification system.
"""


class NotificationError(Exception):
    """Base exception for notification-related errors."""

    pass


class ServiceError(NotificationError):
    """Error related to notification service configuration or validation."""

    pass


class SecurityBlockError(ServiceError):
    """A confirmed send-time SSRF/DNS-rebind block.

    Raised instead of the plain ``ServiceError`` used for pre-dispatch URL
    validation rejects. It is a ``ServiceError`` subclass so every existing
    ``except ServiceError`` / ``pytest.raises(ServiceError)`` still catches
    it and the non-transient INVALID_URL classification is unchanged — this
    subclass exists only so callers that want to tell "malformed/blocked
    URL at validation time" apart from "destination confirmed hostile at
    send time" (e.g. to pick a more accurate user-facing message) can do so
    without parsing exception text.
    """

    pass


class SendError(NotificationError):
    """Error occurred while sending a notification."""

    pass


class RateLimitError(NotificationError):
    """Rate limit exceeded for notifications."""

    pass