Skip to content

Commit 3f5f71e

Browse files
committed
Fikser feil i logging av error etter oppdatering
1 parent 5b27ebe commit 3f5f71e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/no/nav/sifinnsynapi/oppslag/OppslagsKlientKonfig.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ class OppslagsKlientKonfig(
6666

6767
override fun <T : Any, E : Throwable> onError(context: RetryContext, callback: RetryCallback<T, E>, throwable: Throwable) {
6868
val currentTry = context.retryCount
69-
val contextString = context.getAttribute("context.name") as String
69+
val contextName = context.getAttribute("context.name") as String // Navnet på metoden som kalles
7070
val backoff = context.getAttribute("backOffContext")!!
7171
val nextInterval = backoff.nextInterval()
7272

73-
logger.warn("Forsøk {} av {}, {}", currentTry, maxAttempts, contextString.split(" ")[2])
73+
logger.warn("Forsøk {} av {}, {}", currentTry, maxAttempts, contextName)
7474

7575
if (currentTry < maxAttempts) logger.info("Forsøker om: {} ms", nextInterval)
7676
}

0 commit comments

Comments
 (0)