From dd74cd824efd85c84706a062d53c4ee26592ae97 Mon Sep 17 00:00:00 2001 From: Nils Martin Sande Date: Tue, 2 Jul 2024 08:00:15 +0200 Subject: [PATCH] La til mapping fra ClosedReceivedChannelException til RemoveServiceException for pdl.hentPerson --- .../arbeidssokerregisteret/services/PersonInfoService.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/api-start-stopp-perioder/src/main/kotlin/no/nav/paw/arbeidssokerregisteret/services/PersonInfoService.kt b/apps/api-start-stopp-perioder/src/main/kotlin/no/nav/paw/arbeidssokerregisteret/services/PersonInfoService.kt index 4d0213d1..26989998 100644 --- a/apps/api-start-stopp-perioder/src/main/kotlin/no/nav/paw/arbeidssokerregisteret/services/PersonInfoService.kt +++ b/apps/api-start-stopp-perioder/src/main/kotlin/no/nav/paw/arbeidssokerregisteret/services/PersonInfoService.kt @@ -1,5 +1,6 @@ package no.nav.paw.arbeidssokerregisteret.services +import kotlinx.coroutines.channels.ClosedReceiveChannelException import no.nav.paw.arbeidssokerregisteret.RequestScope import no.nav.paw.arbeidssokerregisteret.plugins.InternFeilkode import no.nav.paw.pdl.PdlClient @@ -28,5 +29,11 @@ class PersonInfoService( feilkode = InternFeilkode.UVENTET_FEIL_MOT_EKSTERN_TJENESTE, causedBy = ex ) + } catch (ex: ClosedReceiveChannelException) { + throw RemoteServiceException( + description = "Feil ved henting av personinfo fra PDL", + feilkode = InternFeilkode.UVENTET_FEIL_MOT_EKSTERN_TJENESTE, + causedBy = ex + ) } }