From be5763325608206997a10e556763a2ec160a0461 Mon Sep 17 00:00:00 2001 From: Danie Humphreys Date: Thu, 5 Sep 2024 09:15:00 +0100 Subject: [PATCH] Remove sentry exception. --- .../hmpps/approvedpremisesapi/service/BookingService.kt | 1 - .../approvedpremisesapi/unit/service/BookingServiceTest.kt | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/BookingService.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/BookingService.kt index cfd438402f..ecff9b7df7 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/BookingService.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/service/BookingService.kt @@ -1813,7 +1813,6 @@ class BookingService( extractEntityFromNestedAuthorisableValidatableActionResult(assessmentService.closeAssessment(user, assessmentId)) } catch (exception: Exception) { log.error("Unable to close CAS3 assessment $assessmentId for booking ${booking.id} ", exception) - Sentry.captureException(RuntimeException("Unable to close CAS3 assessment $assessmentId for booking ${booking.id} ", exception)) } } } diff --git a/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/BookingServiceTest.kt b/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/BookingServiceTest.kt index 16f06543e0..64aec695bf 100644 --- a/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/BookingServiceTest.kt +++ b/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/service/BookingServiceTest.kt @@ -4207,9 +4207,6 @@ class BookingServiceTest { verify(exactly = 1) { mockAssessmentRepository.findByApplication_IdAndReallocatedAtNull(bookingEntity.application!!.id) } - verify(exactly = 1) { - Sentry.captureException(any()) - } } @Test