### 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/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlResponseListener.java
Locale.ROOT,
                "parameter: [%s] can only be used with the format [%s] for request [%s]",
                URL_PARAM_DELIMITER,
                CSV.queryParameter(),
                restRequest.path()
            );
            throw new IllegalArgumentException(message);
        }
    }
    @Override
    public RestResponse buildResponse(EsqlQueryResponse esqlResponse) throws Exception {
        boolean success = false;
        try {
            RestResponse restResponse;
            if (mediaType instanceof TextFormat format) {
                restResponse = RestResponse.chunked(
                    RestStatus.OK,
                    ChunkedRestResponseBody.fromTextChunks(
                        format.contentType(restRequest),
                        format.format(restRequest, esqlResponse),
                        esqlResponse
                    )
                );
            } else {
                restResponse = RestResponse.chunked(
                    RestStatus.OK,
                    ChunkedRestResponseBody.fromXContent(esqlResponse, channel.request(), channel, esqlResponse)
                );
            }
            long tookNanos = stopWatch.stop().getNanos();