From 67c4b9e555fbfb511016fd0846477355c37a6b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20H=C3=B8ston?= Date: Tue, 14 Nov 2023 13:59:18 +0100 Subject: [PATCH] =?UTF-8?q?Retter=20feil=20som=20f=C3=B8rte=20til=20at=20d?= =?UTF-8?q?et=20kastes=20exception=20ved=20tom=20response=20fra=20bidrag-p?= =?UTF-8?q?erson.=20Denne=20blir=20n=C3=A5=20heller=20kastet=20som=20en=20?= =?UTF-8?q?warning=20i=20steden=20for=20error=20med=20egen=20feilmelding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/no/nav/bidrag/commons/util/SjekkForNyIdent.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/no/nav/bidrag/commons/util/SjekkForNyIdent.kt b/src/main/kotlin/no/nav/bidrag/commons/util/SjekkForNyIdent.kt index 183d7c2..1a92282 100644 --- a/src/main/kotlin/no/nav/bidrag/commons/util/SjekkForNyIdent.kt +++ b/src/main/kotlin/no/nav/bidrag/commons/util/SjekkForNyIdent.kt @@ -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 @@ -135,8 +136,11 @@ class IdentConsumer( HentePersonidenterRequest(ident, setOf(Identgruppe.FOLKEREGISTERIDENT), false), Array::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 } }