From b8c1881a1cc7bc4a7e805eaf36b3db8f16406f31 Mon Sep 17 00:00:00 2001 From: Michael Bischoff Date: Mon, 25 Oct 2021 16:04:31 +0200 Subject: [PATCH] Addressing assertion failure, 'downgrading' to normal error by moving to try catch. Fixes "java.lang.AssertionError: java.lang.AssertionError: callback must handle its own exceptions" --- .../org/elasticsearch/xpack/enrich/EnrichPolicyRunner.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)); })); }