Weird error message on syntax error, closes #864.

This commit is contained in:
kimchy 2011-04-19 12:23:29 +03:00
parent d29754121c
commit ffc8c3b68a
2 changed files with 7 additions and 1 deletions

View File

@ -19,6 +19,8 @@
package org.elasticsearch;
import org.elasticsearch.rest.RestStatus;
/**
* @author kimchy (Shay Banon)
*/
@ -35,4 +37,8 @@ public class ElasticSearchIllegalArgumentException extends ElasticSearchExceptio
public ElasticSearchIllegalArgumentException(String msg, Throwable cause) {
super(msg, cause);
}
@Override public RestStatus status() {
return RestStatus.BAD_REQUEST;
}
}

View File

@ -110,8 +110,8 @@ public class RestIndicesAliasesAction extends BaseRestHandler {
channel.sendResponse(new XContentThrowableRestResponse(request, e));
} catch (IOException e1) {
logger.warn("Failed to send response", e1);
return;
}
return;
}
client.admin().indices().aliases(indicesAliasesRequest, new ActionListener<IndicesAliasesResponse>() {
@Override public void onResponse(IndicesAliasesResponse response) {