From e81fdf6512d2ab1f15cd97ea289f1afd9c1e7f31 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Mon, 16 Dec 2024 12:22:52 -0800 Subject: [PATCH] Improve workflow failure reason (#1388) --- skyvern/forge/sdk/workflow/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skyvern/forge/sdk/workflow/service.py b/skyvern/forge/sdk/workflow/service.py index 8399d5406..c4e01252a 100644 --- a/skyvern/forge/sdk/workflow/service.py +++ b/skyvern/forge/sdk/workflow/service.py @@ -172,9 +172,9 @@ async def setup_workflow_run( workflow_run_id=workflow_run.workflow_run_id, ) - failure_reason = "Setup up workflow failed due to an unexpected exception" + failure_reason = f"Setup workflow failed due to an unexpected exception: {str(e)}" if isinstance(e, SkyvernException): - failure_reason = f"Setup workflow failed due to an SkyvernException({e.__class__.__name__})" + failure_reason = f"Setup workflow failed due to an SkyvernException({e.__class__.__name__}): {str(e)}" await self.mark_workflow_run_as_failed( workflow_run_id=workflow_run.workflow_run_id, failure_reason=failure_reason