Skip to content

Revert "fix(workflow-block): revert change bubbling up error for workflow block"#965

Merged
icecrasher321 merged 2 commits intostagingfrom
revert-963-fix/workflow-block-error
Aug 14, 2025
Merged

Revert "fix(workflow-block): revert change bubbling up error for workflow block"#965
icecrasher321 merged 2 commits intostagingfrom
revert-963-fix/workflow-block-error

Conversation

@icecrasher321
Copy link
Collaborator

Reverts #963

@vercel
Copy link

vercel bot commented Aug 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Ready Preview Comment Aug 14, 2025 5:18pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs ⬜️ Skipped Aug 14, 2025 5:18pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.

  2. 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

Edit Code Review Bot Settings | Greptile

@vercel vercel bot temporarily deployed to Preview – docs August 14, 2025 17:12 Inactive
@icecrasher321 icecrasher321 merged commit ac41bf8 into staging Aug 14, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the revert-963-fix/workflow-block-error branch August 15, 2025 17:03
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…flow block" (simstudioai#965)

* Revert "fix(workflow-block): revert change bubbling up error for workflow blo…"

This reverts commit 9f0993e.

* revert test changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant