Skip to content

Commit

Permalink
Fix illegal REST response building
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Favre committed Apr 30, 2014
1 parent 8e3ab6f commit 349d105
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,11 @@ public void onResponse(UpdateByQueryResponse response) {
builder.field(Fields.UPDATED, response.updated());

if (response.hasFailures()) {
builder.startObject(Fields.ERRORS);
builder.startArray();
builder.startArray(Fields.ERRORS);
for (String failure : response.mainFailures()) {
builder.field(Fields.ERROR, failure);
}
builder.endArray();
builder.endObject();
}

if (response.indexResponses().length != 0) {
Expand Down

0 comments on commit 349d105

Please sign in to comment.