workflows-py icon indicating copy to clipboard operation
workflows-py copied to clipboard

[Feature Request]: Better way to handle exception on workflows

Open dmvieira opened this issue 6 months ago • 2 comments

Feature Description

Implement an exception handler that includes all step context, allowing for user customization.

Reason

Using workflows we can use retry_policy, but when max retries on a step exceed I can't handle this exceptions and send to another step, for example.

My workaround for now is using another workflow to handle exceptions in a nested workflow, but this workflow exists just for that. Another drawback is that when retry happens, I lost data in the context during that try that raises exception.

The current retry_policy lacks a direct mechanism to handle max-retry exceptions inline. I'm looking for a solution that avoids an extra nested workflow and preserves context data when rerouting after a failed retry.

Value of Feature

exception handler for workflows

dmvieira avatar Jun 03 '25 18:06 dmvieira