Skip to content

Commit

Permalink
Improve workflow failure reason (#1388)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Dec 16, 2024
1 parent 1b7ff69 commit e81fdf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skyvern/forge/sdk/workflow/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e81fdf6

Please sign in to comment.