Skip to content

Commit

Permalink
fix(authorization): also install status page handler for Throwable
Browse files Browse the repository at this point in the history
  • Loading branch information
slisson committed Dec 10, 2024
1 parent b8ae2e6 commit d84748f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ object ModelixAuthorization : BaseRouteScopedPlugin<IModelixAuthorizationConfig,
exception<NoPermissionException> { call, cause ->
call.respondText(text = "403: ${cause.message}", status = HttpStatusCode.Forbidden)
}
exception<Throwable> { call, cause ->
call.respondText(text = "500: $cause", status = HttpStatusCode.InternalServerError)
}
}
}

Expand Down

0 comments on commit d84748f

Please sign in to comment.