From 08c3efd91559e4ee4bb43c7297b1cd68964ca345 Mon Sep 17 00:00:00 2001 From: Torsten Krause Date: Thu, 13 Nov 2025 15:54:01 +0100 Subject: [PATCH] Use caught exception as casue for deployment exception Currently, the causing exception (if any, `null` otherwise) of the caught exception is set as the cause of a newly created and thrown deployment exception. This effectively removes the causing exception, alongside valuable debugging information. When the stack-trace of the deployment exception is logged, the causing exception is missing from that stack-trace. --- .../tyrus/container/grizzly/client/GrizzlyClientSocket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/grizzly-client/src/main/java/org/glassfish/tyrus/container/grizzly/client/GrizzlyClientSocket.java b/containers/grizzly-client/src/main/java/org/glassfish/tyrus/container/grizzly/client/GrizzlyClientSocket.java index 25031a63..e64bf305 100644 --- a/containers/grizzly-client/src/main/java/org/glassfish/tyrus/container/grizzly/client/GrizzlyClientSocket.java +++ b/containers/grizzly-client/src/main/java/org/glassfish/tyrus/container/grizzly/client/GrizzlyClientSocket.java @@ -380,7 +380,7 @@ public void handleTimeout() { } catch (Exception e) { closeTransport(privateTransport); throw Exceptions.deploymentException(String.format("Connection to '%s' failed.", requestURI), - e.getCause()); + e); } }