only return 404 on actual index settings missing, on "_all", return 200
relates to #2676
This commit is contained in:
parent
915019587d
commit
eea3a01765
|
@ -72,9 +72,8 @@ public class RestGetSettingsAction extends BaseRestHandler {
|
||||||
try {
|
try {
|
||||||
MetaData metaData = response.getState().metaData();
|
MetaData metaData = response.getState().metaData();
|
||||||
|
|
||||||
if (metaData.indices().isEmpty()) {
|
if (metaData.indices().isEmpty() && indices.length > 0) {
|
||||||
String indexName = indices.length == 0 ? "_all" : indices[0];
|
channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indices[0]))));
|
||||||
channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indexName))));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue