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: