{"record":{"id":"15f07da699b8c2e2","repo":"apache/seatunnel","slug":"drop-index-failed-15f07d","errorCode":"DROP_INDEX_FAILED","errorMessage":"DELETE {endpoint} response null","messagePattern":"DELETE (.+?) 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":644,"sourceCode":"                throw new ElasticsearchConnectorException(\n                        ElasticsearchConnectorErrorCode.CREATE_INDEX_FAILED,\n                        String.format(\n                                \"PUT %s response status code=%d, body=%s\",\n                                endpoint, response.getStatusLine().getStatusCode(), entity));\n            }\n        } catch (IOException ex) {\n            throw new ElasticsearchConnectorException(\n                    ElasticsearchConnectorErrorCode.CREATE_INDEX_FAILED, ex);\n        }\n    }\n\n    public void dropIndex(String tableName) {\n        String endpoint = String.format(\"/%s\", tableName.toLowerCase());\n        Request request = new Request(\"DELETE\", endpoint);\n        try {\n            Response response = restClient.performRequest(request);\n            if (response == null) {\n                throw new ElasticsearchConnectorException(\n                        ElasticsearchConnectorErrorCode.DROP_INDEX_FAILED,\n                        \"DELETE \" + endpoint + \" response null\");\n            }\n            String entity = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);\n            if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {\n                throw new ElasticsearchConnectorException(\n                        ElasticsearchConnectorErrorCode.DROP_INDEX_FAILED,\n                        String.format(\n                                \"DELETE %s response status code=%d, body=%s\",\n                                endpoint, response.getStatusLine().getStatusCode(), entity));\n            }\n        } catch (IOException ex) {\n            throw new ElasticsearchConnectorException(\n                    ElasticsearchConnectorErrorCode.DROP_INDEX_FAILED, ex);\n        }\n    }\n\n    public void clearIndexData(String indexName) {","sourceCodeStart":626,"sourceCodeEnd":662,"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#L626-L662","documentation":"Logged/raised inside EsRestClient when a DELETE request against an Elasticsearch endpoint completes without returning a response body, so the deletion result cannot be confirmed. It signals an unexpected empty REST response rather than an HTTP error status.","triggerScenarios":"dropIndex(tableName) invocation where restClient.performRequest returns null for the DELETE request.","commonSituations":"Wrapped/custom RestClient implementations; intermediaries dropping DELETE responses; DELETE requests blocked by some proxies/WAFs by policy.","solutions":["Verify with a manual DELETE (on a test index) that the endpoint permits DELETE verbs end-to-end","Use the standard ES Low Level REST Client without response-swallowing wrappers","Inspect proxy/WAF logs for blocked DELETE requests","Trace the REST client to confirm whether Elasticsearch processed the deletion"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"boolean hasResponse(Response r) { return r != null; }","tryCatchPattern":"try {\n    client.dropIndex(tableName);\n} catch (ElasticsearchConnectorException e) {\n    if (e.getMessage().contains(\"response null\")) {\n        // verify with HEAD /{index} whether the deletion actually happened\n        if (!client.indexExists(tableName)) return; // already gone\n    }\n    throw e;\n}","preventionTips":["Avoid proxies that block or swallow DELETE responses","Re-check index existence after a null-response failure instead of blindly retrying","Keep the REST client on standard, supported construction paths"],"tags":["elasticsearch","http","null-response","index-deletion"],"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-14T11:17:12.474Z"}