From 9d00b77dba3eb671c6e41913f4d0b4594bec4546 Mon Sep 17 00:00:00 2001 From: Tom Saunders Date: Wed, 15 Jan 2025 15:21:34 +0000 Subject: [PATCH] Allow Notify exception to propagate from request info. --- .../InformationRequestCorrespondenceService.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/probate/service/InformationRequestCorrespondenceService.java b/src/main/java/uk/gov/hmcts/probate/service/InformationRequestCorrespondenceService.java index 65c3cb73d0..c526078013 100644 --- a/src/main/java/uk/gov/hmcts/probate/service/InformationRequestCorrespondenceService.java +++ b/src/main/java/uk/gov/hmcts/probate/service/InformationRequestCorrespondenceService.java @@ -19,14 +19,8 @@ public class InformationRequestCorrespondenceService { private final NotificationService notificationService; public List emailInformationRequest(CaseDetails caseDetails) throws NotificationClientException { - try { - final Document notification = notificationService.sendEmail(CASE_STOPPED_REQUEST_INFORMATION, caseDetails); - log.info("Successful response for request for information email for case id {} ", caseDetails.getId()); - return List.of(notification); - } catch (NotificationClientException e) { - log.error(e.getMessage()); - // this feels wrong - do we not want to alert the caller that the email sending has failed? - return List.of(); - } + final Document notification = notificationService.sendEmail(CASE_STOPPED_REQUEST_INFORMATION, caseDetails); + log.info("Successful response for request for information email for case id {} ", caseDetails.getId()); + return List.of(notification); } }