Skip to content

Commit 8bb6138

Browse files
committed
bump supported version to 3.4
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
1 parent 8963f08 commit 8bb6138

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

common/src/main/java/org/opensearch/ml/common/contextmanager/ActivationRuleFactory.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static List<ActivationRule> createRules(Map<String, Object> activationCon
4242
rules.add(new TokensExceedRule(tokenThreshold));
4343
log.debug("Created TokensExceedRule with threshold: {}", tokenThreshold);
4444
} else {
45-
log.warn("Invalid token threshold value: {}. Must be positive integer.", tokenValue);
45+
throw new IllegalArgumentException("Invalid token threshold value: " + tokenValue + ". Must be positive integer.");
4646
}
4747
} catch (Exception e) {
4848
log.error("Failed to create TokensExceedRule: {}", e.getMessage());
@@ -58,7 +58,9 @@ public static List<ActivationRule> createRules(Map<String, Object> activationCon
5858
rules.add(new MessageCountExceedRule(messageThreshold));
5959
log.debug("Created MessageCountExceedRule with threshold: {}", messageThreshold);
6060
} else {
61-
log.warn("Invalid message count threshold value: {}. Must be positive integer.", messageValue);
61+
throw new IllegalArgumentException(
62+
"Invalid message count threshold value: " + messageValue + ". Must be positive integer."
63+
);
6264
}
6365
} catch (Exception e) {
6466
log.error("Failed to create MessageCountExceedRule: {}", e.getMessage());

0 commit comments

Comments
 (0)