Revert "fix(workflow-block): revert change bubbling up error for workflow block"#965
Conversation
…flow blo…" This reverts commit 9f0993e.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Greptile Summary
This PR reverts changes made in PR #963, restoring the original error handling behavior in the WorkflowBlockHandler. The change switches back from returning failure objects to throwing errors when child workflows fail.
Specifically, the revert modifies two key sections in workflow-handler.ts:
-
Lines 118-122: After executing a child workflow, the code now checks if the result indicates failure (
success === false) and throws an error with contextual information about the child workflow that failed. This ensures that child workflow failures bubble up to the parent execution context. -
Lines 137-145: In the catch block, instead of returning failure objects, the code now always throws errors. It includes logic to avoid error message duplication by checking if the error already contains child workflow context before enhancing the message.
This change fundamentally alters how workflow block errors propagate through the system. The original PR #963 had changed the behavior to return failure objects, which likely caused child workflow errors to be silently ignored by the parent workflow execution engine. By reverting to throwing exceptions, errors now properly bubble up the execution stack, ensuring that failures in nested workflows are not masked and can trigger appropriate error handling in parent contexts.
The workflow execution system appears to be designed around exception-based error propagation, as evidenced by the test context showing error handling mechanisms that expect thrown errors. This revert aligns the workflow block handler with the broader error handling patterns used throughout the executor system.
Confidence score: 4/5
- This PR is safe to merge as it restores proven error handling behavior that was previously working
- Score reflects that this is a revert to a known working state, but error handling changes always carry some risk
- Pay close attention to the workflow-handler.ts file and monitor for any error handling regressions in production
1 file reviewed, 1 comment
…flow block" (simstudioai#965) * Revert "fix(workflow-block): revert change bubbling up error for workflow blo…" This reverts commit 9f0993e. * revert test changes
Reverts #963