Skip to content

Commit

Permalink
Skipper behandling hvor inntekt mapping feiler.
Browse files Browse the repository at this point in the history
Co-authored-by: André Roaldseth <andre.roaldseth@nav.no>
  • Loading branch information
geiralund and androa committed Nov 25, 2024
1 parent 3138338 commit 08808d8
Showing 1 changed file with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,28 @@ internal class InntektIdBehovløser(
"behandlingId" to behandlingId.toString(),
) {
// @todo: Vi må hente ut inntektId basert på opptjeningsperiode

if (behandlingId.toString() == "019353e1-0bc7-71f5-a93c-f753e988c275") {
log.warn { "Skipper behandling " }
return
}

val virkningsdato = packet[behov]["Virkningsdato"].asLocalDate()
val inntekt =
runBlocking {
kotlin.runCatching {
inntektClient.hentKlassifisertInntekt(
søknadUUID = behandlingId,
aktørId = null,
fødselsnummer = packet["ident"].asText(),
virkningsTidspunkt = virkningsdato,
callId = behovId,
)
}
.onFailure {
kotlin
.runCatching {
inntektClient.hentKlassifisertInntekt(
søknadUUID = behandlingId,
aktørId = null,
fødselsnummer = packet["ident"].asText(),
virkningsTidspunkt = virkningsdato,
callId = behovId,
)
}.onFailure {
log.error(it) { "Feil ved henting av inntekt" }
sikkerLogg.error(it) { "Feil ved henting av inntekt for pakke: ${packet.toJson()}" }
}
.getOrThrow()
}.getOrThrow()
}

packet["@løsning"] =
Expand Down

0 comments on commit 08808d8

Please sign in to comment.