Skip to content

Commit 6915d5b

Browse files
author
Max Hniebergall
committed
fix unique ID message for inference ID matches trained model ID
1 parent 8ca74fb commit 6915d5b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/messages/Messages.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ public final class Messages {
281281
public static final String FIELD_CANNOT_BE_NULL = "Field [{0}] cannot be null";
282282
public static final String MODEL_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT =
283283
"Model IDs must be unique. Requested model ID [{}] matches existing model IDs but must not.";
284+
public static final String INFERENCE_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT =
285+
"Inference endpoint IDs must be unique. Requested inference endpoint ID [{}] matches existing trained model ID(s) but must not.";
284286
public static final String MODEL_ID_DOES_NOT_MATCH_EXISTING_MODEL_IDS_BUT_MUST_FOR_IN_CLUSTER_SERVICE =
285287
"Requested model ID [{}] does not have a matching trained model and thus cannot be updated.";
286288
public static final String INFERENCE_ENTITY_NON_EXISTANT_NO_UPDATE = "The inference endpoint [{}] does not exist and cannot be updated";

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/action/TransportPutInferenceModelAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected void masterOperation(
153153
if ((assignments == null || assignments.isEmpty()) == false) {
154154
listener.onFailure(
155155
ExceptionsHelper.badRequestException(
156-
Messages.MODEL_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT,
156+
Messages.INFERENCE_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT,
157157
request.getInferenceEntityId()
158158
)
159159
);

0 commit comments

Comments
 (0)