Templates Migration: - Migrate admin templates to modules (tenancy, billing, monitoring, marketplace, etc.) - Migrate vendor templates to modules (tenancy, billing, orders, messaging, etc.) - Migrate storefront templates to modules (catalog, customers, orders, cart, checkout, cms) - Migrate public templates to modules (billing, marketplace, cms) - Keep shared templates in app/templates/ (base.html, errors/, partials/, macros/) - Migrate letzshop partials to marketplace module Static Files Migration: - Migrate admin JS to modules: tenancy (23 files), core (5 files), monitoring (1 file) - Migrate vendor JS to modules: tenancy (4 files), core (2 files) - Migrate shared JS: vendor-selector.js to core, media-picker.js to cms - Migrate storefront JS: storefront-layout.js to core - Keep framework JS in static/ (api-client, utils, money, icons, log-config, lib/) - Update all template references to use module_static paths Naming Consistency: - Rename static/platform/ to static/public/ - Rename app/templates/platform/ to app/templates/public/ - Update all extends and static references Documentation: - Update module-system.md with shared templates documentation - Update frontend-structure.md with new module JS organization Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
61 lines
2.1 KiB
Python
61 lines
2.1 KiB
Python
# app/exceptions/__init__.py
|
|
"""
|
|
Base exception classes for the application.
|
|
|
|
This module provides only framework-level exceptions. Domain-specific exceptions
|
|
have been moved to their respective modules:
|
|
|
|
- tenancy: VendorNotFoundException, CompanyNotFoundException, etc.
|
|
- orders: OrderNotFoundException, InvoiceNotFoundException, etc.
|
|
- inventory: InventoryNotFoundException, InsufficientInventoryException, etc.
|
|
- billing: TierNotFoundException, SubscriptionNotFoundException, etc.
|
|
- marketplace: ImportJobNotFoundException, MarketplaceProductNotFoundException, etc.
|
|
- messaging: ConversationNotFoundException, MessageNotFoundException, etc.
|
|
- customers: CustomerNotFoundException, AddressNotFoundException, etc.
|
|
- cart: CartItemNotFoundException, EmptyCartException, etc.
|
|
- catalog: ProductNotFoundException, ProductValidationException, etc.
|
|
- cms: ContentPageNotFoundException, MediaNotFoundException, etc.
|
|
- monitoring: ScanNotFoundException, ViolationNotFoundException, etc.
|
|
|
|
Import pattern:
|
|
# Base exceptions (framework-level)
|
|
from app.exceptions import ValidationException, ResourceNotFoundException
|
|
|
|
# Domain exceptions (module-level)
|
|
from app.modules.orders.exceptions import OrderNotFoundException
|
|
from app.modules.tenancy.exceptions import VendorNotFoundException
|
|
"""
|
|
|
|
# Base exceptions - these are the only exports from root
|
|
from .base import (
|
|
AuthenticationException,
|
|
AuthorizationException,
|
|
BusinessLogicException,
|
|
ConflictException,
|
|
ExternalServiceException,
|
|
RateLimitException,
|
|
ResourceNotFoundException,
|
|
ServiceUnavailableException,
|
|
ValidationException,
|
|
WizamartException,
|
|
)
|
|
|
|
__all__ = [
|
|
# Base exception class
|
|
"WizamartException",
|
|
# Validation and business logic
|
|
"ValidationException",
|
|
"BusinessLogicException",
|
|
# Authentication and authorization
|
|
"AuthenticationException",
|
|
"AuthorizationException",
|
|
# Resource operations
|
|
"ResourceNotFoundException",
|
|
"ConflictException",
|
|
# External services
|
|
"ExternalServiceException",
|
|
"ServiceUnavailableException",
|
|
# Rate limiting
|
|
"RateLimitException",
|
|
]
|