Skip to content

Commit

Permalink
Logger på riktig plass
Browse files Browse the repository at this point in the history
  • Loading branch information
gtcno committed Nov 22, 2024
1 parent f681720 commit f3a8149
Showing 1 changed file with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ internal class InntektIdBehovløser(

companion object {
private val log = KotlinLogging.logger {}
private val sikkerLogg = KotlinLogging.logger("tjenestekall.InntektIdBehovløser")
}

@WithSpan
Expand All @@ -55,13 +56,20 @@ internal class InntektIdBehovløser(
val virkningsdato = packet[behov]["Virkningsdato"].asLocalDate()
val inntekt =
runBlocking {
inntektClient.hentKlassifisertInntekt(
søknadUUID = behandlingId,
aktørId = null,
fødselsnummer = packet["ident"].asText(),
virkningsTidspunkt = virkningsdato,
callId = behovId,
)
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()
}

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

0 comments on commit f3a8149

Please sign in to comment.