Skip to content

[Fix_#1198] Fix exception propagation#1204

Merged
fjtirado merged 4 commits intoserverlessworkflow:mainfrom
fjtirado:Fix_#1198
Mar 5, 2026
Merged

[Fix_#1198] Fix exception propagation#1204
fjtirado merged 4 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
Contributor

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>
@fjtirado fjtirado marked this pull request as ready for review March 5, 2026 13:23
Copilot AI review requested due to automatic review settings March 5, 2026 13:23
Signed-off-by: fjtirado <ftirados@redhat.com>
Copy link
Contributor

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


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

@fjtirado fjtirado marked this pull request as draft March 5, 2026 13:48
@fjtirado fjtirado marked this pull request as draft March 5, 2026 13:48
@fjtirado fjtirado marked this pull request as ready for review March 5, 2026 13:55
Copilot AI review requested due to automatic review settings March 5, 2026 13:55
Copy link
Contributor

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

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


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

Copilot AI review requested due to automatic review settings March 5, 2026 14:08
Copy link
Contributor

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.


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

Copilot AI review requested due to automatic review settings March 5, 2026 14:19
Copy link
Contributor

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.


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

Copilot AI review requested due to automatic review settings March 5, 2026 14:34
Copy link
Contributor

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.


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

Signed-off-by: fjtirado <ftirados@redhat.com>
Update impl/test/src/test/resources/workflows-samples/try-catch-not-match-details.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update impl/test/src/test/resources/workflows-samples/try-catch-match-status.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update impl/test/src/test/resources/workflows-samples/try-catch-match-details.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update impl/test/src/test/resources/workflows-samples/try-catch-error-variable.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.


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

@fjtirado fjtirado merged commit b9351b2 into serverlessworkflow:main Mar 5, 2026
3 checks passed
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

4 participants