Skip to content

Commit

Permalink
Allow Notify exception to propagate from request info.
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-saunders-cts committed Feb 12, 2025
1 parent 2dc52eb commit 9d00b77
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ public class InformationRequestCorrespondenceService {
private final NotificationService notificationService;

public List<Document> 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);
}
}

0 comments on commit 9d00b77

Please sign in to comment.