From c57c3d378c1fe0f900d39cd2342c8d1248090694 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Sun, 15 Dec 2024 22:58:28 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'skyvern/'=20wi?= =?UTF-8?q?th=20remote=20'skyvern/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > [!IMPORTANT] > Improves failure reason messages in `setup_workflow_run` in `service.py` by including exception details. > > - **Behavior**: > - Enhanced failure reason messages in `setup_workflow_run` in `service.py` to include exception details. > - Specifically, appends exception message to generic failure reason and `SkyvernException` specific message. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral) for d01f0f1bd7d0a1927c4a6793472ea5d4cf07cc33. It will automatically update as commits are pushed. --- 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