better status code when failing to parse

This commit is contained in:
Shay Banon 2012-02-16 16:39:38 +02:00
parent 4a8d6deae6
commit eb9503f674
1 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,8 @@
package org.elasticsearch;
import org.elasticsearch.rest.RestStatus;
/**
*
*/
@ -31,4 +33,9 @@ public class ElasticSearchParseException extends ElasticSearchException {
public ElasticSearchParseException(String msg, Throwable cause) {
super(msg, cause);
}
@Override
public RestStatus status() {
return RestStatus.BAD_REQUEST;
}
}