Main exception renamed to WizamartException

This commit is contained in:
2025-10-27 21:55:05 +01:00
parent 1e0cbf5927
commit 5c80ba17c5
15 changed files with 126 additions and 179 deletions

View File

@@ -11,7 +11,7 @@ This module provides classes and functions for:
from typing import Any, Dict, Optional
class LetzShopException(Exception):
class WizamartException(Exception):
"""Base exception class for all custom exceptions."""
def __init__(
@@ -41,7 +41,7 @@ class LetzShopException(Exception):
class ValidationException(LetzShopException):
class ValidationException(WizamartException):
"""Raised when request validation fails."""
def __init__(
@@ -64,7 +64,7 @@ class ValidationException(LetzShopException):
class AuthenticationException(LetzShopException):
class AuthenticationException(WizamartException):
"""Raised when authentication fails."""
def __init__(
@@ -81,7 +81,7 @@ class AuthenticationException(LetzShopException):
)
class AuthorizationException(LetzShopException):
class AuthorizationException(WizamartException):
"""Raised when user lacks permission for an operation."""
def __init__(
@@ -97,7 +97,7 @@ class AuthorizationException(LetzShopException):
details=details,
)
class ResourceNotFoundException(LetzShopException):
class ResourceNotFoundException(WizamartException):
"""Raised when a requested resource is not found."""
def __init__(
@@ -122,7 +122,7 @@ class ResourceNotFoundException(LetzShopException):
},
)
class ConflictException(LetzShopException):
class ConflictException(WizamartException):
"""Raised when a resource conflict occurs."""
def __init__(
@@ -138,7 +138,7 @@ class ConflictException(LetzShopException):
details=details,
)
class BusinessLogicException(LetzShopException):
class BusinessLogicException(WizamartException):
"""Raised when business logic rules are violated."""
def __init__(
@@ -155,7 +155,7 @@ class BusinessLogicException(LetzShopException):
)
class ExternalServiceException(LetzShopException):
class ExternalServiceException(WizamartException):
"""Raised when an external service fails."""
def __init__(
@@ -176,7 +176,7 @@ class ExternalServiceException(LetzShopException):
)
class RateLimitException(LetzShopException):
class RateLimitException(WizamartException):
"""Raised when rate limit is exceeded."""
def __init__(
@@ -196,7 +196,7 @@ class RateLimitException(LetzShopException):
details=rate_limit_details,
)
class ServiceUnavailableException(LetzShopException):
class ServiceUnavailableException(WizamartException):
"""Raised when service is unavailable."""
def __init__(self, message: str = "Service temporarily unavailable"):