From 03dd809dba0161283c8f0167a0a79d02657e1096 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Mon, 8 May 2023 10:34:35 +0200 Subject: [PATCH] Enhance exception handler --- .../openubl/xsender/camel/routes/SunatRouteBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/io/github/project/openubl/xsender/camel/routes/SunatRouteBuilder.java b/core/src/main/java/io/github/project/openubl/xsender/camel/routes/SunatRouteBuilder.java index 084e141e..ec457789 100644 --- a/core/src/main/java/io/github/project/openubl/xsender/camel/routes/SunatRouteBuilder.java +++ b/core/src/main/java/io/github/project/openubl/xsender/camel/routes/SunatRouteBuilder.java @@ -65,12 +65,12 @@ public void configure() { // SOAP Exception .onException(SoapFault.class) - .handled(true) + .continued(true) .process(new SoapSunatErrorResponseProcessor()) .end() // REST exception .onException(HttpOperationFailedException.class) - .handled(exchange -> { + .continued(exchange -> { HttpOperationFailedException httpException = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, HttpOperationFailedException.class); String contentType = httpException.getResponseHeaders().getOrDefault("Content-Type", "");