Consolidate domain exceptions into app.exceptions
Move all shared domain exception classes to backend/app/exceptions.py and update services/routers to import the canonical exceptions. Update docs to reflect the shared exceptions source.
This commit is contained in:
@@ -15,7 +15,12 @@ from app.dependencies import (
|
||||
from app.exceptions import (
|
||||
ConfigOperationError,
|
||||
ConfigValidationError,
|
||||
ConfigWriteError,
|
||||
JailAlreadyActiveError,
|
||||
JailAlreadyInactiveError,
|
||||
JailNameError,
|
||||
JailNotFoundError,
|
||||
JailNotFoundInConfigError,
|
||||
)
|
||||
from app.models.config import (
|
||||
ActivateJailRequest,
|
||||
@@ -30,13 +35,6 @@ from app.models.config import (
|
||||
RollbackResponse,
|
||||
)
|
||||
from app.services import config_service, jail_config_service, jail_service
|
||||
from app.services.jail_config_service import (
|
||||
ConfigWriteError,
|
||||
JailAlreadyActiveError,
|
||||
JailAlreadyInactiveError,
|
||||
JailNameError,
|
||||
JailNotFoundInConfigError,
|
||||
)
|
||||
from app.utils.fail2ban_client import Fail2BanConnectionError
|
||||
|
||||
router: APIRouter = APIRouter()
|
||||
|
||||
Reference in New Issue
Block a user