Skip to content

Commit 8ce8f73

Browse files
committed
address llm comments
Signed-off-by: zane-neo <zaniu@amazon.com>
1 parent bfef919 commit 8ce8f73

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

plugin/src/main/java/org/opensearch/ml/action/connector/TransportCreateConnectorAction.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,14 @@ protected void doExecute(Task task, ActionRequest request, ActionListener<MLCrea
125125
AbstractConnector abstractConnector = (AbstractConnector) connector;
126126
if (abstractConnector.isPlaintextCredentials()) {
127127
if (!mlFeatureEnabledSetting.isPlaintextCredentialsAllowed()) {
128-
// Cluster setting does not allow plaintext credentials - throw exception
129-
throw new IllegalArgumentException(
130-
"Plaintext credentials are not allowed. Please set cluster setting 'plugins.ml_commons.allow_plaintext_credentials' to true to enable plaintext credentials storage."
131-
);
128+
// Cluster setting does not allow plaintext credentials
129+
listener
130+
.onFailure(
131+
new IllegalArgumentException(
132+
"Plaintext credentials are not allowed. Please set cluster setting 'plugins.ml_commons.allow_plaintext_credentials' to true to enable plaintext credentials storage."
133+
)
134+
);
135+
return;
132136
} else {
133137
// Cluster setting allows plaintext credentials
134138
log

0 commit comments

Comments
 (0)