diff --git a/core/scripts/webpanel/exception_handler/handler.py b/core/scripts/webpanel/exception_handler/handler.py index 3d51d53..d8520d0 100644 --- a/core/scripts/webpanel/exception_handler/handler.py +++ b/core/scripts/webpanel/exception_handler/handler.py @@ -12,7 +12,7 @@ def setup_exception_handler(app: FastAPI): ''' Setup exception handler for FastAPI. ''' - @app.exception_handler(Exception) + @app.exception_handler(HTTPException) async def http_exception_handler(request: Request, exc: HTTPException): # type: ignore return JSONResponse( status_code=exc.status_code,