Skip to content

[Fix_#1198] Fix exception propagation#1204

Draft
fjtirado wants to merge 2 commits intoserverlessworkflow:mainfrom
fjtirado:Fix_#1198
Draft

[Fix_#1198] Fix exception propagation#1204
fjtirado wants to merge 2 commits intoserverlessworkflow:mainfrom
fjtirado:Fix_#1198

Conversation

@fjtirado
Copy link
Collaborator

@fjtirado fjtirado commented Mar 4, 2026

Fixes #1198

Copilot AI review requested due to automatic review settings March 4, 2026 16:01
Fixes serverlessworkflow#1198

Signed-off-by: fjtirado <ftirados@redhat.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes exception swallowing in TryExecutor.handleException() so that workflow errors propagate when no catch filter or when/exceptWhen predicate matches, aligning runtime behavior with the DSL spec and issue #1198.

Changes:

  • Update TryExecutor.handleException() to return a failed future when the catch does not match, instead of completing successfully by default.
  • Make RaiseExecutor tolerate missing optional error fields (title, detail) and correct how detail is resolved.
  • Add a new workflow sample + test covering the “catch does not match → error propagates” scenario; normalize sample namespaces.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
impl/test/src/test/resources/workflows-samples/try-catch-retry-reusable.yaml Adjust sample workflow namespace to test.
impl/test/src/test/resources/workflows-samples/try-catch-retry-inline.yaml Adjust sample workflow namespace to test.
impl/test/src/test/resources/workflows-samples/try-catch-not-match.yaml New workflow sample where catch.when does not match and error should propagate.
impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java Add regression test asserting non-matching catch propagates a WorkflowException.
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java Fix exception propagation when catch filters/predicates do not match.
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RaiseExecutor.java Avoid NPE on missing title/detail and correct detail resolver wiring.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: fjtirado <ftirados@redhat.com>
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.

Confirm TryExecutor.handleException Behavior

2 participants