[Fix_#1198] Fix exception propagation#1204
Conversation
Fixes serverlessworkflow#1198 Signed-off-by: fjtirado <ftirados@redhat.com>
There was a problem hiding this comment.
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 thecatchdoes not match, instead of completing successfully by default. - Make
RaiseExecutortolerate missing optional error fields (title,detail) and correct howdetailis 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.
impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: fjtirado <ftirados@redhat.com>
Signed-off-by: fjtirado <ftirados@redhat.com>
There was a problem hiding this comment.
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.
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java
Outdated
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
impl/test/src/test/resources/workflows-samples/try-catch-match-details.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java
Show resolved
Hide resolved
impl/test/src/test/resources/workflows-samples/try-catch-not-match-details.yaml
Outdated
Show resolved
Hide resolved
impl/test/src/test/resources/workflows-samples/try-catch-match-status.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java
Show resolved
Hide resolved
impl/test/src/test/resources/workflows-samples/try-catch-match-details.yaml
Outdated
Show resolved
Hide resolved
impl/test/src/test/java/io/serverlessworkflow/impl/test/RetryTimeoutTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
impl/core/src/main/java/io/serverlessworkflow/impl/executors/TryExecutor.java
Show resolved
Hide resolved
impl/test/src/test/resources/workflows-samples/try-catch-error-variable.yaml
Outdated
Show resolved
Hide resolved
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>
There was a problem hiding this comment.
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.
Fixes #1198