{"record":{"id":"e29ed3c085e96d99","repo":"apache/seatunnel","slug":"list-index-failed-e29ed3","errorCode":"LIST_INDEX_FAILED","errorMessage":"GET {endpoint} response null","messagePattern":"GET (.+?) response null","errorType":"error_code","errorClass":"ElasticsearchConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/client/EsRestClient.java","lineNumber":585,"sourceCode":"                throw new ElasticsearchConnectorException(\n                        ElasticsearchConnectorErrorCode.GET_INDEX_DOCS_COUNT_FAILED,\n                        String.format(\n                                \"GET %s response status code=%d, body=%s\",\n                                endpoint, response.getStatusLine().getStatusCode(), entity));\n            }\n        } catch (IOException ex) {\n            throw new ElasticsearchConnectorException(\n                    ElasticsearchConnectorErrorCode.GET_INDEX_DOCS_COUNT_FAILED, ex);\n        }\n    }\n\n    public List<String> listIndex() {\n        String endpoint = \"/_cat/indices?format=json\";\n        Request request = new Request(\"GET\", endpoint);\n        try {\n            Response response = restClient.performRequest(request);\n            if (response == null) {\n                throw new ElasticsearchConnectorException(\n                        ElasticsearchConnectorErrorCode.LIST_INDEX_FAILED,\n                        \"GET \" + endpoint + \" response null\");\n            }\n            String entity = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);\n            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\n                return JsonUtils.toList(entity, Map.class).stream()\n                        .map(map -> map.get(\"index\").toString())\n                        .collect(Collectors.toList());\n            } else {\n                throw new ElasticsearchConnectorException(\n                        ElasticsearchConnectorErrorCode.LIST_INDEX_FAILED,\n                        String.format(\n                                \"GET %s response status code=%d, body=%s\",\n                                endpoint, response.getStatusLine().getStatusCode(), entity));\n            }\n        } catch (IOException ex) {\n            throw new ElasticsearchConnectorException(\n                    ElasticsearchConnectorErrorCode.LIST_INDEX_FAILED, ex);","sourceCodeStart":567,"sourceCodeEnd":603,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/client/EsRestClient.java#L567-L603","documentation":"Thrown by EsRestClient.listIndex when the GET /_cat/indices?format=json request returns a null Response. The library uses this call to enumerate all indices; a null response makes listing impossible, so it raises LIST_INDEX_FAILED.","triggerScenarios":"listIndex() invocation where restClient.performRequest returns null for the _cat/indices request.","commonSituations":"Non-standard/proxied RestClient returning null; client library version mismatch between the connector and the shaded ES REST client.","solutions":["Use the standard Elasticsearch Low Level REST Client construction path in the connector config","Check proxy/interceptor settings that could swallow the response","Enable wire-level logging (trace) on the REST client to confirm request/response behavior","Align connector dependency versions with the deployed Elasticsearch client jars"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"boolean hasResponse(Response r) { return r != null; }","tryCatchPattern":"try {\n    List<String> indices = client.listIndex();\n} catch (ElasticsearchConnectorException e) {\n    if (e.getMessage().contains(\"response null\")) {\n        // fall back to an explicitly configured index list instead of discovery\n    }\n    throw e;\n}","preventionTips":["Use the standard REST client construction; avoid response-swallowing proxies","Smoke-test _cat/indices reachability before deploying the job","Configure an explicit index_list as a fallback when discovery is fragile"],"tags":["elasticsearch","http","null-response","index-listing"],"backgroundTag":"http-request-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}