Skip to content

Commit 40880ef

Browse files
author
Richard Capraro
committed
fix(log): log exception in ExceptionHandlingConfig
1 parent e1d61c4 commit 40880ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

assembly/src/main/kotlin/com/ps/personne/config/ExceptionHandlingConfig.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import com.ps.personne.problem.respondProblem
66
import io.ktor.http.HttpStatusCode
77
import io.ktor.server.application.Application
88
import io.ktor.server.application.install
9+
import io.ktor.server.application.log
910
import io.ktor.server.plugins.statuspages.StatusPages
1011

1112
object ExceptionHandlingConfig {
1213
fun Application.configureExceptionHandling() {
1314
install(StatusPages) {
1415
exception<Throwable> { call, cause ->
16+
call.application.log.error("Unhandled exception", cause)
1517
call.respondProblem(
1618
HttpStatusCode.InternalServerError,
1719
Problem.of(

0 commit comments

Comments
 (0)