Skip to content

Commit 9f0993e

Browse files
fix(workflow-block): revert change bubbling up error for workflow block (#963)
1 parent 472a22c commit 9f0993e

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

apps/sim/executor/handlers/workflow/workflow-handler.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,6 @@ export class WorkflowBlockHandler implements BlockHandler {
115115
duration
116116
)
117117

118-
// If the child workflow failed, throw an error to trigger proper error handling in the parent
119-
if ((mappedResult as any).success === false) {
120-
const childError = (mappedResult as any).error || 'Unknown error'
121-
throw new Error(`Error in child workflow "${childWorkflowName}": ${childError}`)
122-
}
123-
124118
return mappedResult
125119
} catch (error: any) {
126120
logger.error(`Error executing child workflow ${workflowId}:`, error)
@@ -134,15 +128,11 @@ export class WorkflowBlockHandler implements BlockHandler {
134128
const workflowMetadata = workflows[workflowId]
135129
const childWorkflowName = workflowMetadata?.name || workflowId
136130

137-
// Enhance error message with child workflow context
138-
const originalError = error.message || 'Unknown error'
139-
140-
// Check if error message already has child workflow context to avoid duplication
141-
if (originalError.startsWith('Error in child workflow')) {
142-
throw error // Re-throw as-is to avoid duplication
143-
}
144-
145-
throw new Error(`Error in child workflow "${childWorkflowName}": ${originalError}`)
131+
return {
132+
success: false,
133+
error: error?.message || 'Child workflow execution failed',
134+
childWorkflowName,
135+
} as Record<string, any>
146136
}
147137
}
148138

0 commit comments

Comments
 (0)