Skip to content

Commit fb137da

Browse files
UN-2980 [FIX] Handle null response (#1910)
UN-2980 Handle null response Co-authored-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com>
1 parent de7d557 commit fb137da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

workers/executor/executors/answer_prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def handle_json(
333333
return
334334

335335
parsed_data = repair_json_with_best_structure(answer)
336-
if isinstance(parsed_data, str):
336+
if not isinstance(parsed_data, (dict, list)):
337337
logger.error("Error parsing response to JSON")
338338
structured_output[prompt_key] = {}
339339
return

0 commit comments

Comments
 (0)