### Description

We need to make sure we capture the exceptions leading to a non-successful response to the user. 
These should capture any other wrapped exceptions. 
Depending on the cause, they should be log warnings or errors.
x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/plugin/RestSqlQueryAction.java
return List.of(
            Route.builder(GET, Protocol.SQL_QUERY_REST_ENDPOINT)
                .replaces(GET, Protocol.SQL_QUERY_DEPRECATED_REST_ENDPOINT, RestApiVersion.V_7)
                .build(),
            Route.builder(POST, Protocol.SQL_QUERY_REST_ENDPOINT)
                .replaces(POST, Protocol.SQL_QUERY_DEPRECATED_REST_ENDPOINT, RestApiVersion.V_7)
                .build()
        );
    }
    @Override
    protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {
        SqlQueryRequest sqlRequest;
        try (XContentParser parser = request.contentOrSourceParamParser()) {
            sqlRequest = SqlQueryRequest.fromXContent(parser);
        }
        return channel -> {
            RestCancellableNodeClient cancellableClient = new RestCancellableNodeClient(client, request.getHttpChannel());
            cancellableClient.execute(SqlQueryAction.INSTANCE, sqlRequest, new SqlResponseListener(channel, request, sqlRequest));
        };
    }
    @Override
    protected Set<String> responseParams() {
        return Collections.singleton(URL_PARAM_DELIMITER);
    }
    @Override
    public String getName() {
        return "sql_query";
    }
}