Skip to content

Adding guidance to MD5 calculation exception message #5186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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