From 73ee527017ba70b1693e98f4665cb84c84287f62 Mon Sep 17 00:00:00 2001 From: Sabiha Khan Date: Tue, 31 Mar 2026 16:58:08 +0530 Subject: [PATCH] fix: skip updating gathered_context when the extracted variables is not a dict --- api/services/workflow/pipecat_engine.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/services/workflow/pipecat_engine.py b/api/services/workflow/pipecat_engine.py index d4590d8..f430dab 100644 --- a/api/services/workflow/pipecat_engine.py +++ b/api/services/workflow/pipecat_engine.py @@ -443,6 +443,13 @@ class PipecatEngine: extraction_variables, parent_context, extraction_prompt ) ) + if not isinstance(extracted_data, dict): + logger.warning( + f"Variable extraction for node {node.name} returned " + f"{type(extracted_data).__name__} instead of dict, " + f"skipping update. Data: {extracted_data}" + ) + return self._gathered_context.update(extracted_data) extracted_variables = self._gathered_context.setdefault( "extracted_variables", {}