Skip to content

Commit

Permalink
Logge mer rund oppretting av oppgaver i Gosys.
Browse files Browse the repository at this point in the history
  • Loading branch information
geiralund committed Apr 29, 2024
1 parent 8fb9f84 commit 2ef044a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions mediator/src/main/kotlin/no/nav/dagpenger/mottak/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ internal object Config {
)
}

internal fun String.addHttprotocoll(): String = "https://$this"
private fun String.addHttpsrotocoll(): String = "https://$this"

val Configuration.dpProxyTokenProvider: () -> String by lazy {
{
Expand Down Expand Up @@ -123,11 +123,11 @@ internal object Config {

fun Configuration.skjermingApiUrl() = this[Key("SKJERMING_API_URL", stringType)]

fun Configuration.dpProxyUrl() = this[Key("DP_PROXY_HOST", stringType)].addHttprotocoll()
fun Configuration.dpProxyUrl() = this[Key("DP_PROXY_HOST", stringType)].addHttpsrotocoll()

fun Configuration.pdlApiUrl() = this[Key("PDL_API_HOST", stringType)].addHttprotocoll()
fun Configuration.pdlApiUrl() = this[Key("PDL_API_HOST", stringType)].addHttpsrotocoll()

fun Configuration.gosysUrl(): String = this[Key("OPPGAVE_URL", stringType)].addHttprotocoll()
fun Configuration.gosysUrl(): String = this[Key("OPPGAVE_URL", stringType)].addHttpsrotocoll()

fun asMap(): Map<String, String> =
properties.list().reversed().fold(emptyMap()) { map, pair ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ internal class GosysClient(config: Configuration) : GosysOppslag {
setBody(oppgave)
}.body<GosysOppgaveResponse>().id
} catch (e: Exception) {
logger.error { "Kunne ikke opprette gosys oppgave for journalpost med id ${oppgave.journalpostId}" }
logger.error(e) { "Kunne ikke opprette gosys oppgave for journalpost med id ${oppgave.journalpostId}" }
throw e
}
}
Expand Down

0 comments on commit 2ef044a

Please sign in to comment.