Improve workflow failure reason (#1388)

This commit is contained in:
Shuchang Zheng
2024-12-16 12:22:52 -08:00
committed by GitHub
parent 1b7ff69f85
commit e81fdf6512

View File

@@ -172,9 +172,9 @@ class WorkflowService:
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