fabriziofortino commented on code in PR #2139: URL: https://github.com/apache/jackrabbit-oak/pull/2139#discussion_r1982129123
########## oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java: ########## @@ -185,7 +185,13 @@ private void provisionIndex() throws IOException { return; } - final CreateIndexRequest request = ElasticIndexHelper.createIndexRequest(indexName, indexDefinition); + CreateIndexRequest request; + try { + request = ElasticIndexHelper.createIndexRequest(indexName, indexDefinition); + } catch (IllegalArgumentException e) { Review Comment: should we be more generic here and catch `Exception`? ########## oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java: ########## @@ -185,7 +185,13 @@ private void provisionIndex() throws IOException { return; } - final CreateIndexRequest request = ElasticIndexHelper.createIndexRequest(indexName, indexDefinition); + CreateIndexRequest request; + try { + request = ElasticIndexHelper.createIndexRequest(indexName, indexDefinition); + } catch (IllegalArgumentException e) { + LOG.warn("Failed to create index {}: {}", indexName, e.toString()); Review Comment: this should be logged as `error` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org