From fd9266dbc631bd7763602428aac1513f91813d19 Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 22 Sep 2010 16:03:42 +0200 Subject: [PATCH] fix wrong REST response generation of cluster state --- .../action/admin/cluster/state/RestClusterStateAction.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java index 9320fef37ee..0454d15ebec 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java @@ -229,7 +229,7 @@ public class RestClusterStateAction extends BaseRestHandler { builder.endArray(); builder.endObject(); } - builder.endObject(); + builder.endArray(); } @@ -252,6 +252,9 @@ public class RestClusterStateAction extends BaseRestHandler { } @Override public void onFailure(Throwable e) { + if (logger.isDebugEnabled()) { + logger.debug("failed to handle cluster state", e); + } try { channel.sendResponse(new XContentThrowableRestResponse(request, e)); } catch (IOException e1) {