From d84748ffb0960e365ed295b077941b78e20b5772 Mon Sep 17 00:00:00 2001 From: slisson Date: Wed, 27 Nov 2024 09:23:49 +0100 Subject: [PATCH] fix(authorization): also install status page handler for Throwable --- .../kotlin/org/modelix/authorization/AuthorizationPlugin.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authorization/src/main/kotlin/org/modelix/authorization/AuthorizationPlugin.kt b/authorization/src/main/kotlin/org/modelix/authorization/AuthorizationPlugin.kt index ae01b10de2..7011cded96 100644 --- a/authorization/src/main/kotlin/org/modelix/authorization/AuthorizationPlugin.kt +++ b/authorization/src/main/kotlin/org/modelix/authorization/AuthorizationPlugin.kt @@ -110,6 +110,9 @@ object ModelixAuthorization : BaseRouteScopedPlugin { call, cause -> call.respondText(text = "403: ${cause.message}", status = HttpStatusCode.Forbidden) } + exception { call, cause -> + call.respondText(text = "500: $cause", status = HttpStatusCode.InternalServerError) + } } }