Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/sim/executor/execution/block-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ export class BlockExecutor {
}
}

this.state.setBlockOutput(node.id, normalizedOutput, duration)
const { childTraceSpans: _traces, ...outputForState } = normalizedOutput
this.state.setBlockOutput(node.id, outputForState as NormalizedBlockOutput, duration)
Comment thread
waleedlatif1 marked this conversation as resolved.

if (!isSentinel && blockLog) {
const childWorkflowInstanceId =
Expand All @@ -211,7 +212,7 @@ export class BlockExecutor {
)
}

return normalizedOutput
return outputForState as NormalizedBlockOutput
} catch (error) {
return await this.handleBlockError(
error,
Expand Down Expand Up @@ -270,7 +271,6 @@ export class BlockExecutor {
}

if (ChildWorkflowError.isChildWorkflowError(error)) {
errorOutput.childTraceSpans = error.childTraceSpans
errorOutput.childWorkflowName = error.childWorkflowName
if (error.childWorkflowSnapshotId) {
errorOutput.childWorkflowSnapshotId = error.childWorkflowSnapshotId
Expand All @@ -287,8 +287,8 @@ export class BlockExecutor {
blockLog.input = this.sanitizeInputsForLog(input)
blockLog.output = filterOutputForLog(block.metadata?.id || '', errorOutput, { block })

if (errorOutput.childTraceSpans && Array.isArray(errorOutput.childTraceSpans)) {
blockLog.childTraceSpans = errorOutput.childTraceSpans
if (ChildWorkflowError.isChildWorkflowError(error) && error.childTraceSpans.length > 0) {
blockLog.childTraceSpans = error.childTraceSpans
}
}

Expand Down
Loading