Skip to content

Commit 5fa0640

Browse files
authored
Adding guidance to MD5 calculation exception message (#5186)
1 parent 2acea26 commit 5fa0640

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

services/sqs/src/main/java/software/amazon/awssdk/services/sqs/internal/MessageMD5ChecksumInterceptor.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ private static String calculateMessageBodyMd5(String messageBody) {
218218
expectedMd5 = Md5Utils.computeMD5Hash(messageBody.getBytes(StandardCharsets.UTF_8));
219219
} catch (Exception e) {
220220
throw SdkClientException.builder()
221-
.message("Unable to calculate the MD5 hash of the message body. " + e.getMessage())
221+
.message("Unable to calculate the MD5 hash of the message body. "
222+
+ "Potential reasons include JVM configuration or FIPS compliance issues. "
223+
+ "To disable message MD5 validation, you can set checksumValidationEnabled "
224+
+ "to false when instantiating the client." + e.getMessage())
222225
.cause(e)
223226
.build();
224227
}
@@ -271,7 +274,10 @@ private static String calculateMessageAttributesMd5(final Map<String, MessageAtt
271274
}
272275
} catch (Exception e) {
273276
throw SdkClientException.builder()
274-
.message("Unable to calculate the MD5 hash of the message attributes. " + e.getMessage())
277+
.message("Unable to calculate the MD5 hash of the message attributes. "
278+
+ "Potential reasons include JVM configuration or FIPS compliance issues. "
279+
+ "To disable message MD5 validation, you can set checksumValidationEnabled "
280+
+ "to false when instantiating the client." + e.getMessage())
275281
.cause(e)
276282
.build();
277283
}

0 commit comments

Comments
 (0)