Skip to content

Commit

Permalink
update exception type for reporting (#3151)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-britton-moj authored Jan 31, 2024
1 parent 3554bf4 commit 73bffa6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
)
Expand Down

0 comments on commit 73bffa6

Please sign in to comment.