From cc2b976d76a95f6a83abf6c6c8a975c436c9e60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Mu=C3=B1oz?= Date: Wed, 29 Jul 2026 15:31:12 +0200 Subject: [PATCH 1/2] [Fix_1578] malformed JSON from HTTP 200 is not normalized into WorkflowError error with Quarkus Rest client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gonzalo Muñoz --- .../impl/executors/http/AbstractRequestExecutor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java b/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java index 4fd11b188..d0c6742d3 100644 --- a/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java +++ b/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java @@ -27,6 +27,7 @@ import io.serverlessworkflow.impl.auth.AuthUtils; import io.serverlessworkflow.types.Errors; import jakarta.ws.rs.ProcessingException; +import jakarta.ws.rs.WebApplicationException; import jakarta.ws.rs.client.Invocation.Builder; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response.Status.Family; @@ -59,11 +60,10 @@ public WorkflowModel apply( .fromAny(response.readEntity(converter.responseType())); } catch (ProcessingException | IllegalStateException ex) { throw new WorkflowException( - WorkflowError.error(Errors.DATA.toString(), Errors.DATA.status()) - .details(ex.getMessage()) - .instance(task.position().jsonPointer()) - .build(), - ex); + WorkflowError.communication(Errors.DATA.toString(), task, ex).build(), ex); + } catch (WebApplicationException ex) { + throw new WorkflowException( + WorkflowError.communication(ex.getResponse().getStatus(), task, ex).build(), ex); } } From 01303ded15ca1dc04b1f056fa466480fea9baf8a Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti Date: Wed, 29 Jul 2026 15:44:19 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Francisco Javier Tirado Sarti Signed-off-by: Francisco Javier Tirado Sarti --- .../impl/executors/http/AbstractRequestExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java b/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java index d0c6742d3..101fbe5f5 100644 --- a/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java +++ b/impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/AbstractRequestExecutor.java @@ -60,7 +60,7 @@ public WorkflowModel apply( .fromAny(response.readEntity(converter.responseType())); } catch (ProcessingException | IllegalStateException ex) { throw new WorkflowException( - WorkflowError.communication(Errors.DATA.toString(), task, ex).build(), ex); + WorkflowError.communication(Errors.DATA.status(), task, ex).build(), ex); } catch (WebApplicationException ex) { throw new WorkflowException( WorkflowError.communication(ex.getResponse().getStatus(), task, ex).build(), ex);