From 5f5227c6de7f72ce0dca7f387b21da8037358fb1 Mon Sep 17 00:00:00 2001 From: Kateryna Senchenko <42532596+KaterynaSenchenko@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:53:08 +0200 Subject: [PATCH] MODSOURMAN-1066 Correct error message (#820) * Add handling if DI_ERROR is not sent * Check entity type not null when constructing DI_ERROR payload * Add test * Fail future with the actual cause (parsing exception) to be shown on UI --- .../java/org/folio/services/RecordsPublishingServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod-source-record-manager-server/src/main/java/org/folio/services/RecordsPublishingServiceImpl.java b/mod-source-record-manager-server/src/main/java/org/folio/services/RecordsPublishingServiceImpl.java index 1558c1b45..6ffa06fe1 100644 --- a/mod-source-record-manager-server/src/main/java/org/folio/services/RecordsPublishingServiceImpl.java +++ b/mod-source-record-manager-server/src/main/java/org/folio/services/RecordsPublishingServiceImpl.java @@ -166,6 +166,6 @@ public Future sendDiErrorEvent(Throwable throwable, } } LOGGER.warn("sendDiErrorEvent:: Appropriate DI_ERROR payload builder not found, DI_ERROR without records info will be send"); - return Future.failedFuture(new NotFoundException(format("Couldn't find DI_ERROR payload builder for recordType %s", currentRecord.getRecordType()))); + return Future.failedFuture(throwable); } }