Skip to content

Commit 525ed70

Browse files
authored
Improve H2 connection exception message (#3306)
1 parent 031aee3 commit 525ed70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

http-clients/netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/internal/http2/MultiplexedChannelRecord.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ void closeChildChannels(Throwable t) {
206206
}
207207

208208
private Throwable decorateConnectionException(Throwable t) {
209-
String message = "An error occurred on the connection: " + t.getMessage();
209+
String message =
210+
String.format("An error occurred on the connection: %s, [channel: %s]. All streams will be closed", t,
211+
connection.id());
210212
if (t instanceof IOException) {
211213
return new IOException(message, t);
212214
}

0 commit comments

Comments
 (0)