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 Nov 27, 2024
1 parent c6ab4b7 commit 187b03d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,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 187b03d

Please sign in to comment.