Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Retter feil som førte til at det kastes exception ved tom response fr…
Browse files Browse the repository at this point in the history
…a bidrag-person. Denne blir nå heller kastet som en warning i steden for error med egen feilmelding
  • Loading branch information
simhos committed Nov 14, 2023
1 parent edabbf8 commit 67c4b9e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.nav.bidrag.commons.util

import no.nav.bidrag.commons.CorrelationId
import no.nav.bidrag.commons.web.client.AbstractRestClient
import no.nav.bidrag.domene.ident.Ident
import no.nav.bidrag.domene.ident.Personident
Expand Down Expand Up @@ -135,8 +136,11 @@ class IdentConsumer(
HentePersonidenterRequest(ident, setOf(Identgruppe.FOLKEREGISTERIDENT), false),
Array<PersonidentDto>::class.java
).body?.first()?.ident ?: ident
} catch (e: NoSuchElementException) {
LOGGER.warn("Bidrag-person fant ingen person på kalt ident: ${e.message}, callId: ${CorrelationId.fetchCorrelationIdForThread()}.\n${e.printStackTrace()}")
ident
} catch (e: Exception) {
LOGGER.error("Noe gikk galt i kall mot bidrag-person: ${e.message} \n${e.stackTrace}")
LOGGER.error("Noe gikk galt i kall mot bidrag-person: ${e.message}, callId: ${CorrelationId.fetchCorrelationIdForThread()}.\n${e.printStackTrace()}")
ident
}
}
Expand Down

0 comments on commit 67c4b9e

Please sign in to comment.