Main exception renamed to WizamartException
This commit is contained in:
@@ -535,7 +535,7 @@ class DNSVerificationException(ExternalServiceException):
|
||||
| 409 | `ConflictException` | Resource conflicts |
|
||||
| 422 | `ValidationException` | Input validation errors |
|
||||
| 429 | `RateLimitException` | Rate limiting |
|
||||
| 500 | `LetzShopException` | Generic errors |
|
||||
| 500 | `WizamartException` | Generic errors |
|
||||
| 502 | `ExternalServiceException` | Third-party failures |
|
||||
|
||||
### Step 2: Update Exception Exports
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
│ Exception Handler │
|
||||
│ app/exceptions/handler.py │
|
||||
│ │
|
||||
│ @app.exception_handler(LetzShopException) │
|
||||
│ @app.exception_handler(WizamartException) │
|
||||
│ async def custom_exception_handler(...): │
|
||||
│ return JSONResponse( │
|
||||
│ status_code=exc.status_code, │
|
||||
|
||||
@@ -9,7 +9,7 @@ The LetzShop API uses a unified custom exception system to provide consistent, m
|
||||
### Exception Hierarchy
|
||||
|
||||
```
|
||||
LetzShopException (Base)
|
||||
WizamartException (Base)
|
||||
├── ValidationException (422)
|
||||
├── AuthenticationException (401)
|
||||
├── AuthorizationException (403)
|
||||
@@ -91,7 +91,7 @@ The system handles four categories of exceptions:
|
||||
```python
|
||||
# app/exceptions/handler.py
|
||||
|
||||
@app.exception_handler(LetzShopException)
|
||||
@app.exception_handler(WizamartException)
|
||||
async def custom_exception_handler(request, exc):
|
||||
"""Handle all custom business exceptions"""
|
||||
return JSONResponse(
|
||||
|
||||
Reference in New Issue
Block a user