File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/main/java/org/elasticsearch/plugin/nlpcn Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 4
4
import org .apache .logging .log4j .Logger ;
5
5
import org .elasticsearch .client .internal .node .NodeClient ;
6
6
import org .elasticsearch .rest .RestResponse ;
7
+ import org .elasticsearch .xcontent .XContentParseException ;
7
8
import org .elasticsearch .xcontent .XContentParser ;
8
9
import org .elasticsearch .xcontent .XContentType ;
9
10
import org .elasticsearch .plugin .nlpcn .executors .ActionRequestRestExecuterFactory ;
@@ -51,7 +52,7 @@ public List<Route> routes() {
51
52
protected RestChannelConsumer prepareRequest (RestRequest request , NodeClient client ) throws IOException {
52
53
try (XContentParser parser = request .contentOrSourceParamParser ()) {
53
54
parser .mapStrings ().forEach ((k , v ) -> request .params ().putIfAbsent (k , v ));
54
- } catch (IOException e ) {
55
+ } catch (XContentParseException e ) {
55
56
// LOGGER.warn("Please use json format params, like: {\"sql\":\"SELECT * FROM test\"}");
56
57
}
57
58
You can’t perform that action at this time.
0 commit comments