Skip to content

Commit ce06948

Browse files
committed
fix(authorization): also install status page handler for Throwable
1 parent 01812f5 commit ce06948

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

authorization/src/main/kotlin/org/modelix/authorization/AuthorizationPlugin.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ object ModelixAuthorization : BaseRouteScopedPlugin<IModelixAuthorizationConfig,
110110
exception<NoPermissionException> { call, cause ->
111111
call.respondText(text = "403: ${cause.message}", status = HttpStatusCode.Forbidden)
112112
}
113+
exception<Throwable> { call, cause ->
114+
call.respondText(text = "500: $cause", status = HttpStatusCode.InternalServerError)
115+
}
113116
}
114117
}
115118

0 commit comments

Comments
 (0)