Skip to content

Commit

Permalink
Improving logging II
Browse files Browse the repository at this point in the history
  • Loading branch information
GavCookCO committed Apr 10, 2024
1 parent f72f649 commit 24d4b57
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public void indexEntry(final CMAEntry contentfulEntry) {
.onStatus(HttpStatus::isError, clientResponse -> {
log.info("Elastic search update json string: {}", body);
log.error("response code from open search: {}", clientResponse.statusCode());
log.error("response from open search: {}", clientResponse.bodyToMono(String.class));
log.error("response headers from open search: {}", clientResponse.headers().asHttpHeaders());
log.error("response body from open search: {}", clientResponse.bodyToMono(String.class));

throw new IndexingException("failed to add CMA entry with ID " + contentfulEntry.getId() + " to index");
})
.bodyToMono(void.class)
Expand All @@ -56,7 +58,9 @@ public void removeIndexEntry(final CMAEntry contentfulEntry) {
.onStatus(HttpStatus::isError, clientResponse -> {
log.info("Elastic search delete json string: {}", body);
log.error("response code from open search: {}", clientResponse.statusCode());
log.error("response from open search: {}", clientResponse.bodyToMono(String.class));
log.error("response headers from open search: {}", clientResponse.headers().asHttpHeaders());
log.error("response body from open search: {}", clientResponse.bodyToMono(String.class));

throw new IndexingException("failed to remove CMA entry with ID " + contentfulEntry.getId() + " from index");
})
.bodyToMono(void.class)
Expand Down

0 comments on commit 24d4b57

Please sign in to comment.