From 59dec5a3de9f3c8be2292dc9d95b2b9ea25712d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn-Are=20Flaten?= Date: Thu, 5 Dec 2024 13:51:42 +0100 Subject: [PATCH] chore: add more logging --- .../papirsykmelding/api/SmregistreringClient.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/no/nav/sykdig/digitalisering/papirsykmelding/api/SmregistreringClient.kt b/src/main/kotlin/no/nav/sykdig/digitalisering/papirsykmelding/api/SmregistreringClient.kt index cf33605f..03418eb9 100644 --- a/src/main/kotlin/no/nav/sykdig/digitalisering/papirsykmelding/api/SmregistreringClient.kt +++ b/src/main/kotlin/no/nav/sykdig/digitalisering/papirsykmelding/api/SmregistreringClient.kt @@ -60,13 +60,13 @@ class SmregistreringClient( ): ResponseEntity { if(!isValidOppgaveId(oppgaveId)) throw IllegalArgumentException("Invalid oppgaveId does not contain only alphanumerical characters. oppgaveId: $oppgaveId") + log.info("OppgveId is valid: $oppgaveId") val headers = HttpHeaders() headers.contentType = MediaType.APPLICATION_JSON headers.setBearerAuth(removeBearerPrefix(authorization)) val uri = UriComponentsBuilder.fromHttpUrl("$url/api/v1/oppgave/{oppgaveId}") - .pathSegment(oppgaveId) - .build() + .buildAndExpand(oppgaveId) .toUri() val res = @@ -76,6 +76,7 @@ class SmregistreringClient( HttpEntity(headers), PapirManuellOppgave::class.java, ) + log.info("papirsykmelding: Body from proxy call to smreg ${res.body} ") return res } @@ -90,8 +91,7 @@ class SmregistreringClient( val uri = UriComponentsBuilder.fromHttpUrl("$url/api/v1/sykmelder/{hprNummer}") - .pathSegment(hprNummer) - .build() + .buildAndExpand(hprNummer) .toUri() return smregisteringRestTemplate.exchange(