Skip to content

Commit

Permalink
Adding guidance to MD5 calculation exception message (aws#5186)
Browse files Browse the repository at this point in the history
  • Loading branch information
cenedhryn authored and akidambisrinivasan committed Jun 28, 2024
1 parent 66d230e commit 3103e0e
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ private static String calculateMessageBodyMd5(String messageBody) {
expectedMd5 = Md5Utils.computeMD5Hash(messageBody.getBytes(StandardCharsets.UTF_8));
} catch (Exception e) {
throw SdkClientException.builder()
.message("Unable to calculate the MD5 hash of the message body. " + e.getMessage())
.message("Unable to calculate the MD5 hash of the message body. "
+ "Potential reasons include JVM configuration or FIPS compliance issues. "
+ "To disable message MD5 validation, you can set checksumValidationEnabled "
+ "to false when instantiating the client." + e.getMessage())
.cause(e)
.build();
}
Expand Down Expand Up @@ -271,7 +274,10 @@ private static String calculateMessageAttributesMd5(final Map<String, MessageAtt
}
} catch (Exception e) {
throw SdkClientException.builder()
.message("Unable to calculate the MD5 hash of the message attributes. " + e.getMessage())
.message("Unable to calculate the MD5 hash of the message attributes. "
+ "Potential reasons include JVM configuration or FIPS compliance issues. "
+ "To disable message MD5 validation, you can set checksumValidationEnabled "
+ "to false when instantiating the client." + e.getMessage())
.cause(e)
.build();
}
Expand Down

0 comments on commit 3103e0e

Please sign in to comment.