Main exception renamed to WizamartException
This commit is contained in:
@@ -16,7 +16,7 @@ from fastapi import Request, HTTPException
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
from fastapi.responses import JSONResponse, RedirectResponse
|
||||
|
||||
from .base import LetzShopException
|
||||
from .base import WizamartException
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -24,8 +24,8 @@ logger = logging.getLogger(__name__)
|
||||
def setup_exception_handlers(app):
|
||||
"""Setup exception handlers for the FastAPI app."""
|
||||
|
||||
@app.exception_handler(LetzShopException)
|
||||
async def custom_exception_handler(request: Request, exc: LetzShopException):
|
||||
@app.exception_handler(WizamartException)
|
||||
async def custom_exception_handler(request: Request, exc: WizamartException):
|
||||
"""Handle custom exceptions."""
|
||||
|
||||
# Special handling for 401 on HTML page requests (redirect to login)
|
||||
|
||||
Reference in New Issue
Block a user