diff --git a/sim/executor/index.ts b/sim/executor/index.ts index 8575618f36..aa6a1ea133 100644 --- a/sim/executor/index.ts +++ b/sim/executor/index.ts @@ -797,6 +797,22 @@ export class Executor { blockLog.durationMs = new Date(blockLog.endedAt).getTime() - new Date(blockLog.startedAt).getTime() + // Log the error even if we'll continue execution through error path + context.blockLogs.push(blockLog) + addConsole({ + output: {}, + error: + error.message || + `Error executing ${block.metadata?.id || 'unknown'} block: ${String(error)}`, + durationMs: blockLog.durationMs, + startedAt: blockLog.startedAt, + endedAt: blockLog.endedAt, + workflowId: context.workflowId, + timestamp: blockLog.startedAt, + blockName: block.metadata?.name || 'Unnamed Block', + blockType: block.metadata?.id || 'unknown', + }) + // Check for error connections and follow them if they exist const hasErrorPath = this.activateErrorPath(blockId, context)