Skip to content

Commit 078cff9

Browse files
committed
403 -> 400
1 parent 99a952c commit 078cff9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void writeTo(StreamOutput out) throws IOException {
138138
"Cannot send a _preview request with "
139139
+ TransformField.PREVIEW_AS_INDEX_REQUEST.getPreferredName()
140140
+ " to an outdated node. Please upgrade the node to 9.3.0+ and try again.",
141-
RestStatus.FORBIDDEN
141+
RestStatus.BAD_REQUEST
142142
);
143143
}
144144
}

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformActionRequestTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void testAsIndexRequestIsNotBackwardsCompatible() throws IOException {
102102
ElasticsearchStatusException.class,
103103
() -> copyWriteable(testInstance, getNamedWriteableRegistry(), instanceReader(), unsupportedVersion)
104104
);
105-
assertThat(statusException.status(), equalTo(RestStatus.FORBIDDEN));
105+
assertThat(statusException.status(), equalTo(RestStatus.BAD_REQUEST));
106106
assertThat(
107107
statusException.getMessage(),
108108
equalTo(

0 commit comments

Comments
 (0)