StatusPagesConfig

A StatusPages plugin configuration.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class StatusContext(val call: ApplicationCall, val content: OutgoingContent)

A context for status config method.

Properties

Link copied to clipboard

Provides access to exception handlers of the exception class.

Link copied to clipboard

Provides access to status handlers based on a status code.

Functions

Link copied to clipboard
inline fun <T : Throwable> exception(noinline handler: suspend (call: ApplicationCall, cause: T) -> Unit)

Register an exception handler for the exception type T and its children.

fun <T : Throwable> exception(klass: KClass<T>, handler: suspend (call: ApplicationCall, T) -> Unit)

Register an exception handler for the exception class klass and its children.

Link copied to clipboard
fun status(vararg status: HttpStatusCode, handler: suspend (ApplicationCall, HttpStatusCode) -> Unit)
@JvmName(name = "statusWithContext")
fun status(vararg status: HttpStatusCode, handler: suspend StatusPagesConfig.StatusContext.(HttpStatusCode) -> Unit)

Register a status handler for the status code.

Link copied to clipboard
fun unhandled(handler: suspend (ApplicationCall) -> Unit)

Register a handler for the unhandled calls.