mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix: return error in logs
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user