Skip to content

Commit

Permalink
oppdatering etter PR
Browse files Browse the repository at this point in the history
  • Loading branch information
mettok committed Jan 24, 2025
1 parent f4989b3 commit ba70100
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/no/nav/auth/AuthClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AuthClient(
target: String,
): TokenResponse =
try {
sikkerLogger().info("Requesting token for $target from ${provider.alias} and endpoint $tokenEndpoint")
sikkerLogger().info("Forsøker å hente token for $target fra ${provider.alias} og endpoint $tokenEndpoint")
httpClient
.submitForm(
tokenEndpoint,
Expand Down Expand Up @@ -119,8 +119,8 @@ fun AuthClient.fetchToken(
when (it) {
is TokenResponse.Success -> it.accessToken
is TokenResponse.Error -> {
sikkerLogger().error("Feilet å hente token status: ${it.status} - ${it.error.errorDescription}")
throw RuntimeException("Feilet å hente token status: ${it.status} - ${it.error.errorDescription}")
sikkerLogger().error("Feilet å hente token. status: ${it.status} - ${it.error.errorDescription}")
throw RuntimeException("Feilet å hente token. status: ${it.status} - ${it.error.errorDescription}")
}
}
}
Expand Down

0 comments on commit ba70100

Please sign in to comment.