Skip to content

Commit

Permalink
Update IndexingService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre committed Mar 1, 2024
1 parent e33a362 commit c0349b4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
));
}
}
Expand Down

0 comments on commit c0349b4

Please sign in to comment.