Weird error message on syntax error, closes #864.
This commit is contained in:
parent
d29754121c
commit
ffc8c3b68a
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue