From 2db3e046d82d5a38d81e3116cf4b153aa70ef088 Mon Sep 17 00:00:00 2001 From: Rod Boev Date: Sat, 13 Jun 2026 08:03:02 -0400 Subject: [PATCH] fix(approval): log empty gateway queue entries for diagnostics --- api/routes.py | 2 ++ api/streaming.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/api/routes.py b/api/routes.py index 901cb0ed..7301ea5a 100644 --- a/api/routes.py +++ b/api/routes.py @@ -11234,6 +11234,8 @@ def _handle_approval_pending(handler, parsed): if raw: p = raw total = len(gw_queue) + else: + logger.warning("Gateway queue entry for %s has no .data attribute", sid) if p: return j(handler, {"pending": dict(p), "pending_count": total}) return j(handler, {"pending": None, "pending_count": 0}) diff --git a/api/streaming.py b/api/streaming.py index 73de8b7e..efdab377 100644 --- a/api/streaming.py +++ b/api/streaming.py @@ -5938,6 +5938,8 @@ def _run_agent_streaming( raw = getattr(gw_queue[0], 'data', None) or {} if raw: p = dict(raw) + else: + logger.warning("Gateway queue entry for %s has no .data attribute", session_id) if p: put('approval', p) except ImportError: