mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-17 02:39:40 +00:00
task v2 doesn't have failure_reason (#2760)
This commit is contained in:
parent
5bd2cabae4
commit
592ed941ce
1 changed files with 6 additions and 1 deletions
|
@ -2558,7 +2558,12 @@ class TaskV2Block(Block):
|
|||
# Determine block status from task status using module-level mapping
|
||||
block_status = TASKV2_TO_BLOCK_STATUS.get(task_v2.status, BlockStatus.failed)
|
||||
success = task_v2.status == TaskV2Status.completed
|
||||
failure_reason = task_v2.failure_reason
|
||||
failure_reason: str | None = None
|
||||
task_v2_workflow_run_id = task_v2.workflow_run_id
|
||||
if task_v2_workflow_run_id:
|
||||
task_v2_workflow_run = await app.DATABASE.get_workflow_run(task_v2_workflow_run_id, organization_id)
|
||||
if task_v2_workflow_run:
|
||||
failure_reason = task_v2_workflow_run.failure_reason
|
||||
|
||||
# If continue_on_failure is True, we treat the block as successful even if the task failed
|
||||
# This allows the workflow to continue execution despite this block's failure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue