"""Shared domain exception classes used across routers and services.""" from __future__ import annotations class JailNotFoundError(Exception): """Raised when a requested jail name does not exist.""" def __init__(self, name: str) -> None: self.name = name super().__init__(f"Jail not found: {name!r}") class JailOperationError(Exception): """Raised when a fail2ban jail operation fails.""" class ConfigValidationError(Exception): """Raised when config values fail validation before applying.""" class ConfigOperationError(Exception): """Raised when a config payload update or command fails.""" class ServerOperationError(Exception): """Raised when a server control command (e.g. refresh) fails."""