Skip to content

Commit 57c0a50

Browse files
authored
[ML] Enhance error message for snapshot upgrade (#125215)
1 parent 0c8d6ba commit 57c0a50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/action/TransportUpgradeJobModelSnapshotAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ protected void masterOperation(Task task, Request request, ClusterState state, A
211211
&& (JobState.CLOSED.equals(MlTasks.getJobState(request.getJobId(), customMetadata)) == false)) {
212212
listener.onFailure(
213213
ExceptionsHelper.conflictStatusException(
214-
"Cannot upgrade snapshot [{}] for job [{}] as it is the current primary job snapshot and the job's state is [{}]",
214+
"Cannot upgrade snapshot [{}] for job [{}] as it is the current primary job snapshot and the job's state is [{}]. "
215+
+ "Please close the job before upgrading the snapshot.",
215216
request.getSnapshotId(),
216217
request.getJobId(),
217218
MlTasks.getJobState(request.getJobId(), customMetadata)

0 commit comments

Comments
 (0)