From c689742d0bbf52ed5166f3beb398aa4ab5a56a8f Mon Sep 17 00:00:00 2001 From: aitbc Date: Sun, 3 May 2026 23:02:31 +0200 Subject: [PATCH] fix: remove keyword args from logger.warning in error_handler Changed logger.warning to use string formatting instead of keyword arguments to avoid Logger._log() errors. --- aitbc/middleware/error_handler.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/aitbc/middleware/error_handler.py b/aitbc/middleware/error_handler.py index 2b2da443..9aa145af 100644 --- a/aitbc/middleware/error_handler.py +++ b/aitbc/middleware/error_handler.py @@ -23,11 +23,7 @@ class ErrorHandlerMiddleware(BaseHTTPMiddleware): return response except HTTPException as e: logger.warning( - "HTTP exception", - status_code=e.status_code, - detail=e.detail, - path=request.url.path, - method=request.method, + f"HTTP exception - Status: {e.status_code}, Detail: {e.detail}, Path: {request.url.path}, Method: {request.method}" ) return JSONResponse( status_code=e.status_code,