Skip to content

Commit fcfe637

Browse files
mjmbischoffAdam Locke
authored andcommitted
Addressing assertion failure, 'downgrading' to Exception - enrich (elastic#79717)
Addressing assertion failure, 'downgrading' to Exception by moving to try catch. Fixes "java.lang.AssertionError: java.lang.AssertionError: callback must handle its own exceptions"
1 parent effd8f2 commit fcfe637

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyRunner.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,10 @@ public void run() {
127127
client.admin().indices().getIndex(getIndexRequest, listener.delegateFailure((l, getIndexResponse) -> {
128128
try {
129129
validateMappings(getIndexResponse);
130+
prepareAndCreateEnrichIndex(toMappings(getIndexResponse));
130131
} catch (Exception e) {
131132
l.onFailure(e);
132-
return;
133133
}
134-
prepareAndCreateEnrichIndex(toMappings(getIndexResponse));
135134
}));
136135
}
137136

0 commit comments

Comments
 (0)