Skip to content

fix(workflow-block): revert change bubbling up error for workflow block#963

Merged
icecrasher321 merged 1 commit into
stagingfrom
fix/workflow-block-error
Aug 14, 2025
Merged

fix(workflow-block): revert change bubbling up error for workflow block#963
icecrasher321 merged 1 commit into
stagingfrom
fix/workflow-block-error

Conversation

@icecrasher321
Copy link
Copy Markdown
Collaborator

Summary

Don't bubble up child workflow in catch all errors like this. Attempt at fixing child workflow missing intermittent errors being surfaced.

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
sim 🔄 Building Preview Comment Aug 14, 2025 7:17am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs ⬜️ Skipped Aug 14, 2025 7:17am

@icecrasher321 icecrasher321 merged commit 9f0993e into staging Aug 14, 2025
2 of 4 checks passed
Copy link
Copy Markdown
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 error handling changes in the WorkflowBlockHandler to address intermittent issues where child workflow errors weren't being properly surfaced to parent workflows. The change fundamentally shifts from a throw-based error propagation model to a return-based error handling approach.

The main modifications involve:

  • Removing explicit error throwing for failed child workflows (lines 115-118) that previously checked if success === false and threw errors with enhanced messages
  • Changing the catch block behavior (lines 119-136) to return structured error objects instead of throwing exceptions
  • Eliminating duplicate error message logic that was apparently causing formatting issues in nested workflows

This change aligns the workflow block error handling with the existing pattern in mapChildOutputToParent method, which already returns structured error objects rather than throwing. The WorkflowBlockHandler manages child workflow executions within parent workflows, and this change ensures that error information flows consistently through the execution chain without getting lost in exception handling complexities.

The execution stack cleanup logic remains intact, ensuring that failed child workflow executions are properly removed from the tracking system. The structured error response includes success status, error message, and child workflow name for debugging purposes.

Confidence score: 3/5

  • This PR introduces significant architectural changes to error handling that could mask critical failures by treating them as successful executions containing error data
  • Score reflects concerns about changing core error propagation behavior without comprehensive testing coverage, as only manual testing was performed
  • Pay close attention to workflow-handler.ts and ensure thorough testing of nested workflow error scenarios before merging

1 file reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

Comment thread apps/sim/executor/handlers/workflow/workflow-handler.ts
Comment thread apps/sim/executor/handlers/workflow/workflow-handler.ts
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