Skip to content

Commit f096160

Browse files
committed
modify error message
Signed-off-by: xinyual <xinyual@amazon.com>
1 parent a57a6a9 commit f096160

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ml-algorithms/src/main/java/org/opensearch/ml/engine/ModelHelper.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ public void downloadAndSplit(
231231
String hash = calculateFileHash(modelZipFile);
232232
if (modelContentHash == null) {
233233
log.error("Hash code need to be provided when register via url.");
234-
throw (new IllegalArgumentException("Hash code need to be provided when register via url."));
234+
throw (new IllegalArgumentException(
235+
"Model content Hash code need to be provided when register via url. Please calculate sha 256 Hash code."
236+
));
235237
} else if (hash.equals(modelContentHash)) {
236238
List<String> chunkFiles = splitFileIntoChunks(modelZipFile, modelPartsPath, CHUNK_SIZE);
237239
Map<String, Object> result = new HashMap<>();

0 commit comments

Comments
 (0)