diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestService.java b/server/src/main/java/org/elasticsearch/ingest/IngestService.java index cbc985ea4215c..e4673e6ccbe72 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestService.java +++ b/server/src/main/java/org/elasticsearch/ingest/IngestService.java @@ -722,7 +722,8 @@ public void onFailure(Exception e) { executePipelines(pipelines, indexRequest, ingestDocument, documentListener); indexRequest.setPipelinesHaveRun(); - documentParsingObserver.setIndexName(indexRequest.index()); + assert actionRequest.index() != null; + documentParsingObserver.setIndexName(actionRequest.index()); documentParsingObserver.close(); i++;