From 07a5fa26c7b4d09b7fe4803a60e735d40bf56452 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 18 Apr 2023 12:19:59 +0300 Subject: [PATCH] Avoid using ClientWebApplicationException as the cause of ClientWebApplicationException (cherry picked from commit afa5e428933afed2e39fd303a3e88e5ee80c5354) --- .../reactive/client/impl/RestClientRequestContext.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/RestClientRequestContext.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/RestClientRequestContext.java index 1d0e1380b3cfc..59e89940f428c 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/RestClientRequestContext.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/RestClientRequestContext.java @@ -179,7 +179,9 @@ protected Throwable unwrapException(Throwable t) { + invokedMethod.getDeclaringClass().getName() + "#" + invokedMethod.getName() + "'"; } - return new ClientWebApplicationException(message, webApplicationException, + return new ClientWebApplicationException(message, + webApplicationException instanceof ClientWebApplicationException ? webApplicationException.getCause() + : webApplicationException, webApplicationException.getResponse()); } return res;