From 1f3c7c010f29e642268063e5f4b261d8319ca6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Prunayre?= Date: Wed, 28 Feb 2024 13:39:53 +0100 Subject: [PATCH] Update IndexingService.java --- .../org/fao/geonet/indexing/service/IndexingService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/services/indexing/src/main/java/org/fao/geonet/indexing/service/IndexingService.java b/modules/services/indexing/src/main/java/org/fao/geonet/indexing/service/IndexingService.java index 5d3f501f..c73d1ac8 100644 --- a/modules/services/indexing/src/main/java/org/fao/geonet/indexing/service/IndexingService.java +++ b/modules/services/indexing/src/main/java/org/fao/geonet/indexing/service/IndexingService.java @@ -8,6 +8,7 @@ import co.elastic.clients.elasticsearch.ElasticsearchClient; import co.elastic.clients.elasticsearch._types.AcknowledgedResponse; +import co.elastic.clients.elasticsearch._types.ElasticsearchException; import co.elastic.clients.elasticsearch._types.Refresh; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; @@ -249,10 +250,10 @@ private void sendToIndex(IndexRecords indexRecords, failureCount )); } - } catch (IOException ioException) { + } catch (ElasticsearchException | IOException esException) { log.error(String.format( "Error while sending records to index. Error is: %s.", - ioException.getMessage() + esException.getMessage() )); } }