From cb82cc9fd408bb085b76ea8caf7c46caa6ffce9e Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Tue, 4 Feb 2025 16:35:22 +0000 Subject: [PATCH] Fix exception handling bug --- core/scripts/webpanel/exception_handler/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,