"""Exception hierarchy for gnexus-gauth."""


class GAuthException(RuntimeError):
    """Root package exception."""


class ConfigurationException(GAuthException):
    """Invalid configuration."""


class StateValidationException(GAuthException):
    """Invalid or missing authorization state."""


class PkceException(GAuthException):
    """Invalid or missing PKCE verifier."""


class TokenExchangeException(GAuthException):
    """Token exchange failed."""


class TokenRefreshException(GAuthException):
    """Token refresh failed."""


class TokenRevokeException(GAuthException):
    """Token revoke failed."""


class TransportException(GAuthException):
    """HTTP transport failure."""


class RuntimeApiException(GAuthException):
    """Runtime API returned an error."""


class WebhookVerificationException(GAuthException):
    """Invalid webhook signature."""


class WebhookPayloadException(GAuthException):
    """Malformed webhook payload."""
