From 4527c85e3d52b47355291fd6f2f39cd1a4ef7523 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 7 Dec 2025 11:59:18 +0100 Subject: [PATCH] fix: use standard logging format to avoid reserved 'message' key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python's logging.LogRecord reserves 'message' as an attribute. Using it in extra dict causes KeyError. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/dependencies/auth.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/dependencies/auth.py b/app/dependencies/auth.py index 9568614..654dbd0 100644 --- a/app/dependencies/auth.py +++ b/app/dependencies/auth.py @@ -131,11 +131,8 @@ async def get_current_agent_compat( # Fall back to legacy Bearer token authentication if authorization: logger.warning( - "deprecated_auth_scheme", - extra={ - "message": "Bearer token auth is deprecated. Use X-Agent-Id and X-Agent-Secret headers.", - "agent_id": str(agent_id) if agent_id else None, - }, + "deprecated_auth_scheme: Bearer token auth is deprecated. Use X-Agent-Id and X-Agent-Secret headers. agent_id=%s", + str(agent_id) if agent_id else None, ) # Parse Bearer token