Skip to content

Commit 41066b8

Browse files
authored
fix(executor): surface pre-execution errors (#1917)
1 parent 5cea73f commit 41066b8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,22 @@ export function useWorkflowExecution() {
10041004
},
10051005
logs: [],
10061006
}
1007+
1008+
// Add error to console
1009+
addConsole({
1010+
input: {},
1011+
output: {},
1012+
success: false,
1013+
error: data.error,
1014+
durationMs: data.duration || 0,
1015+
startedAt: new Date(Date.now() - (data.duration || 0)).toISOString(),
1016+
endedAt: new Date().toISOString(),
1017+
workflowId: activeWorkflowId,
1018+
blockId: 'workflow',
1019+
executionId: executionId || uuidv4(),
1020+
blockName: 'Workflow Execution',
1021+
blockType: 'workflow',
1022+
})
10071023
},
10081024
},
10091025
})

0 commit comments

Comments
 (0)