Skip to content

Automate browser based workflows with AI

Check error existance for the context manager handling (#757)

Kerem Yilmaz6f61573f9bbd
diff --git a/skyvern/forge/sdk/workflow/context_manager.py b/skyvern/forge/sdk/workflow/context_manager.py
index 4b75413b3..3be659910 100644
--- a/skyvern/forge/sdk/workflow/context_manager.py
+++ b/skyvern/forge/sdk/workflow/context_manager.py
@@ -293,7 +293,8 @@ class WorkflowRunContext:
and isinstance(parameter.source, OutputParameter)
and parameter.source.key == output_parameter.key
):
- if isinstance(value, dict) and "errors" in value:
+ if isinstance(value, dict) and "errors" in value and value["errors"]:
+ # Is this the correct way to handle errors from task blocks?
LOG.error(
f"Output parameter {output_parameter.key} has errors. Setting ContextParameter {parameter.key} value to None"
)