Skip to content

Commit 491381f

Browse files
committed
Fixing override method to exclude attempts = 0
1 parent 8ab9677 commit 491381f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/exception/SdkClientException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static SdkClientException create(String message, Throwable cause) {
5050
@Override
5151
public String getMessage() {
5252
String message = rawMessage();
53-
if (numAttempts() != null) {
53+
if (numAttempts() != null && numAttempts() > 0) {
5454
SdkDiagnostics sdkDiagnostics = SdkDiagnostics.builder().numAttempts(numAttempts()).build();
5555
message = message + " " + sdkDiagnostics;
5656
}

0 commit comments

Comments
 (0)