diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java index e5db4dedd23..ac68cb1d593 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java @@ -35,10 +35,15 @@ public Flux call() { .bodyToFlux(RightDTO.class) .doOnError( throwable -> throwable instanceof WebClientResponseException, - throwable -> log.error( - "Feil ved henting av rettigheter i Altinn. \n{}", - ((WebClientResponseException) throwable).getResponseBodyAsString() - ) + throwable -> { + var response = (WebClientResponseException) throwable; + log.error( + "Feil ved henting av rettigheter i Altinn. {} {} {} {}\n", + response.getResponseBodyAsString(), + response.getHeaders(), + response.getStatusCode(), + response.getStatusText()); + } ); } } \ No newline at end of file