[Fix_#1198] Fix exception propagation#1204
Draft
fjtirado wants to merge 2 commits intoserverlessworkflow:mainfrom
Draft
[Fix_#1198] Fix exception propagation#1204fjtirado wants to merge 2 commits intoserverlessworkflow:mainfrom
fjtirado wants to merge 2 commits intoserverlessworkflow:mainfrom
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1198