Skip to content

Commit

Permalink
Ser ut som R&R har sin egen call.respond, som vi vil hoppe utenfor (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindsh authored Nov 11, 2024
1 parent 291becc commit 3888ef8
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ class StatusPagesKonfigurasjon(

status(*statusCodes5xx) { call, code ->
routeLogger.debug("Fikk kode {}", code)
if (code == HttpStatusCode.ServiceUnavailable) {
routeLogger.warn("Et endepunkt returnerte Service Unavailable. Det er sannsynligvis fra R&R")
return@status call.respond(
ForespoerselException(
status = code.value,
code = code.description,
detail = "Tjenesten er ikke tilgjengelig",
),
)
}

val feil =
InternfeilLoggerException(
status = code.value,
Expand Down

0 comments on commit 3888ef8

Please sign in to comment.