class HttpApplicationOptions
source · line 4public
public class HttpApplicationOptions internal constructor(
/** Maps an uncommitted endpoint failure while its middleware Context remains installed. */
public val errorMapper: suspend (HttpContext, Throwable) -> HttpResult =
suspend { ctx, _ -> text("Internal Server Error\nRequest: " + ctx.requestId, 500U) },
/** Observes failures outside internal locks; observer errors do not replace the primary cause. */
public val onError: ((HttpContext, Throwable) -> Unit)? = None
)
Application-level error handling, independent of the server's transport configuration.
Extensions
public fun HttpApplicationOptions.copy(configure: HttpApplicationOptionsBuilder.() -> Unit = {}): HttpApplicationOptions· scoop:scoop.http.server:0.1.0
property onError
source · line 9public
public val onError: ((HttpContext, Throwable) -> Unit)? = None
get: public read-only
Observes failures outside internal locks; observer errors do not replace the primary cause.
property errorMapper
source · line 6public
public val errorMapper: suspend (HttpContext, Throwable) -> HttpResult =
suspend { ctx, _ -> text("Internal Server Error\nRequest: " + ctx.requestId, 500U) }
get: public read-only
Maps an uncommitted endpoint failure while its middleware Context remains installed.