[Fix #1242] Raising workflow error in case there is a conversion issue#1243
[Fix #1242] Raising workflow error in case there is a conversion issue#1243fjtirado merged 1 commit intoserverlessworkflow:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #1242 by translating HTTP response conversion failures into a workflow-level DATA error, allowing workflows to catch/ignore conversion problems instead of crashing on runtime exceptions.
Changes:
- Wraps HTTP response entity deserialization in a
try/catchto intercept conversion failures. - Converts
jakarta.ws.rs.ProcessingExceptioninto aWorkflowExceptionwithErrors.DATAmetadata.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java
Outdated
Show resolved
Hide resolved
impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java
Outdated
Show resolved
Hide resolved
impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #1242 by converting HTTP response-to-workflow-model conversion failures from uncaught runtime exceptions into a workflow-level DATA error (WorkflowException), allowing workflows to catch/ignore these failures.
Changes:
- Wrap HTTP invocation
Responsein a try-with-resources block to ensure it is closed. - Catch JAX-RS entity conversion failures during
readEntity(...)/ response handling and rethrow asWorkflowExceptionwithErrors.DATA.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java
Outdated
Show resolved
Hide resolved
… a conversion issue Signed-off-by: fjtirado <ftirados@redhat.com>
Fix #1242