Exceptions handling

Report a typo

Consider a Status Pages configuration with the following code:

exception<ForbiddenException> { call, cause ->
    call.respondText(
        text = "403: You do not have rights to access this page", status = HttpStatusCode.Forbidden
    )
}
exception<DatabaseIsUnavailableException> { call, cause ->
    call.respondText(
        text = "500: Database is unavailable", status = HttpStatusCode.InternalServerError
    )
}

Which exceptions will be handled by the Status Pages plugin?

Select one or more options from the list
___

Create a free account to access the full topic