File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
src/main/kotlin/no/nav/tms/statistikk Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,9 @@ import io.ktor.server.routing.*
8
8
9
9
fun Route.loginApi (loginRepository : LoginRepository ) {
10
10
post(" /innlogging" ) {
11
-
12
- val login: Login = call.receive()
13
- loginRepository.registerLogin(login.ident)
14
- call.respond(HttpStatusCode .NoContent )
11
+ val login: Login = call.receive()
12
+ loginRepository.registerLogin(login.ident)
13
+ call.respond(HttpStatusCode .NoContent )
15
14
}
16
15
}
17
16
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import io.github.oshai.kotlinlogging.KotlinLogging
13
13
import no.nav.tms.statistikk.login.LoginRepository
14
14
import no.nav.tms.statistikk.login.loginApi
15
15
import no.nav.tms.token.support.azure.validation.azure
16
+ import java.io.IOException
16
17
import java.text.DateFormat
17
18
18
19
fun Application.statistikkApi (
@@ -32,6 +33,11 @@ fun Application.statistikkApi(
32
33
securelog.warn(cause) { " Bad request til statistikkApi" }
33
34
call.respond(HttpStatusCode .BadRequest , cause.message ? : " " )
34
35
}
36
+ is IOException -> {
37
+ log.warn { " IO-feil i statistikk-api" }
38
+ securelog.warn(cause) { " IO-feil i statistikk-api" }
39
+ call.respond(HttpStatusCode .InternalServerError )
40
+ }
35
41
else -> {
36
42
log.error { " Feil i statistikkApi" }
37
43
securelog.error(cause) { " Feil i statistikkApi" }
You can’t perform that action at this time.
0 commit comments