refactor: rename Wizamart to Orion across entire codebase
Replace all ~1,086 occurrences of Wizamart/wizamart/WIZAMART/WizaMart with Orion/orion/ORION across 184 files. This includes database identifiers, email addresses, domain references, R2 bucket names, DNS prefixes, encryption salt, Celery app name, config defaults, Docker configs, CI configs, documentation, seed data, and templates. Renames homepage-wizamart.html template to homepage-orion.html. Fixes duplicate file_pattern key in api.yaml architecture rule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,16 +33,16 @@ from .base import (
|
||||
BusinessLogicException,
|
||||
ConflictException,
|
||||
ExternalServiceException,
|
||||
OrionException,
|
||||
RateLimitException,
|
||||
ResourceNotFoundException,
|
||||
ServiceUnavailableException,
|
||||
ValidationException,
|
||||
WizamartException,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# Base exception class
|
||||
"WizamartException",
|
||||
"OrionException",
|
||||
# Validation and business logic
|
||||
"ValidationException",
|
||||
"BusinessLogicException",
|
||||
|
||||
@@ -11,7 +11,7 @@ This module provides classes and functions for:
|
||||
from typing import Any
|
||||
|
||||
|
||||
class WizamartException(Exception):
|
||||
class OrionException(Exception):
|
||||
"""Base exception class for all custom exceptions."""
|
||||
|
||||
def __init__(
|
||||
@@ -39,7 +39,7 @@ class WizamartException(Exception):
|
||||
return result
|
||||
|
||||
|
||||
class ValidationException(WizamartException):
|
||||
class ValidationException(OrionException):
|
||||
"""Raised when request validation fails."""
|
||||
|
||||
def __init__(
|
||||
@@ -60,7 +60,7 @@ class ValidationException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class AuthenticationException(WizamartException):
|
||||
class AuthenticationException(OrionException):
|
||||
"""Raised when authentication fails."""
|
||||
|
||||
def __init__(
|
||||
@@ -77,7 +77,7 @@ class AuthenticationException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class AuthorizationException(WizamartException):
|
||||
class AuthorizationException(OrionException):
|
||||
"""Raised when user lacks permission for an operation."""
|
||||
|
||||
def __init__(
|
||||
@@ -94,7 +94,7 @@ class AuthorizationException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class ResourceNotFoundException(WizamartException):
|
||||
class ResourceNotFoundException(OrionException):
|
||||
"""Raised when a requested resource is not found."""
|
||||
|
||||
def __init__(
|
||||
@@ -120,7 +120,7 @@ class ResourceNotFoundException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class ConflictException(WizamartException):
|
||||
class ConflictException(OrionException):
|
||||
"""Raised when a resource conflict occurs."""
|
||||
|
||||
def __init__(
|
||||
@@ -137,7 +137,7 @@ class ConflictException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class BusinessLogicException(WizamartException):
|
||||
class BusinessLogicException(OrionException):
|
||||
"""Raised when business logic rules are violated."""
|
||||
|
||||
def __init__(
|
||||
@@ -154,7 +154,7 @@ class BusinessLogicException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class ExternalServiceException(WizamartException):
|
||||
class ExternalServiceException(OrionException):
|
||||
"""Raised when an external service fails."""
|
||||
|
||||
def __init__(
|
||||
@@ -175,7 +175,7 @@ class ExternalServiceException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class RateLimitException(WizamartException):
|
||||
class RateLimitException(OrionException):
|
||||
"""Raised when rate limit is exceeded."""
|
||||
|
||||
def __init__(
|
||||
@@ -196,7 +196,7 @@ class RateLimitException(WizamartException):
|
||||
)
|
||||
|
||||
|
||||
class ServiceUnavailableException(WizamartException):
|
||||
class ServiceUnavailableException(OrionException):
|
||||
"""Raised when service is unavailable."""
|
||||
|
||||
def __init__(self, message: str = "Service temporarily unavailable"):
|
||||
|
||||
@@ -19,7 +19,7 @@ from fastapi.responses import JSONResponse, RedirectResponse
|
||||
from app.modules.enums import FrontendType
|
||||
from middleware.frontend_type import get_frontend_type
|
||||
|
||||
from .base import WizamartException
|
||||
from .base import OrionException
|
||||
from .error_renderer import ErrorPageRenderer
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -28,8 +28,8 @@ logger = logging.getLogger(__name__)
|
||||
def setup_exception_handlers(app):
|
||||
"""Setup exception handlers for the FastAPI app."""
|
||||
|
||||
@app.exception_handler(WizamartException)
|
||||
async def custom_exception_handler(request: Request, exc: WizamartException):
|
||||
@app.exception_handler(OrionException)
|
||||
async def custom_exception_handler(request: Request, exc: OrionException):
|
||||
"""Handle custom exceptions with context-aware rendering."""
|
||||
|
||||
# Special handling for auth errors on HTML page requests (redirect to login)
|
||||
|
||||
Reference in New Issue
Block a user