better status code when failing to parse
This commit is contained in:
parent
4a8d6deae6
commit
eb9503f674
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue