From 73bffa657eaab1cc0eaab2aa756b1de097f9a795 Mon Sep 17 00:00:00 2001 From: Anthony Britton <105213050+anthony-britton-moj@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:58:18 +0000 Subject: [PATCH] update exception type for reporting (#3151) --- .../justice/digital/hmpps/messaging/ActionPlanNotification.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/refer-and-monitor-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/ActionPlanNotification.kt b/projects/refer-and-monitor-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/ActionPlanNotification.kt index 4559d1ad2f..d55d920e2b 100644 --- a/projects/refer-and-monitor-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/ActionPlanNotification.kt +++ b/projects/refer-and-monitor-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/ActionPlanNotification.kt @@ -1,7 +1,7 @@ package uk.gov.justice.digital.hmpps.messaging import org.springframework.stereotype.Component -import uk.gov.justice.digital.hmpps.exception.IgnorableMessageException +import uk.gov.justice.digital.hmpps.exception.UnprocessableException import uk.gov.justice.digital.hmpps.integrations.delius.contact.ContactRepository import uk.gov.justice.digital.hmpps.integrations.delius.contact.ContactTypeRepository import uk.gov.justice.digital.hmpps.integrations.delius.contact.entity.Contact @@ -34,7 +34,7 @@ class ActionPlanNotification( fun notify(notification: ActionPlanNotification): EventProcessingResult { val nsi = nsiRepository.findByPersonCrnAndExternalReference(notification.crn, notification.referral.urn) - ?: throw IgnorableMessageException( + ?: throw UnprocessableException( "Unable to find referral for action plan notification", mapOf("crn" to notification.crn, "referralId" to notification.referral.id) )