diff --git a/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyRunner.java b/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyRunner.java index 799c77c98b504..8569048dc81fc 100644 --- a/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyRunner.java +++ b/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyRunner.java @@ -127,11 +127,10 @@ public void run() { client.admin().indices().getIndex(getIndexRequest, listener.delegateFailure((l, getIndexResponse) -> { try { validateMappings(getIndexResponse); + prepareAndCreateEnrichIndex(toMappings(getIndexResponse)); } catch (Exception e) { l.onFailure(e); - return; } - prepareAndCreateEnrichIndex(toMappings(getIndexResponse)); })); }