StackTraceRecoveringKtorRequestHandler

Extension of KtorRequestHandler which tries to recover stack trace information lost through Ktor's io.ktor.util.pipeline.SuspendFunctionGun.

This is done by creating a RecoveredStackTrace to capture the stack trace up until the point just before KtorRequestHandler.handle gets called, then if that call throws any type of Throwable the RecoveredStackTrace gets added to the original Throwable as a suppressed exception and the original Throwable is rethrown.

See also

Constructors

Link copied to clipboard
constructor(delegate: KtorRequestHandler)

Properties

Link copied to clipboard
open override val token: String

The Discord bot authorization token used on requests.

Functions

Link copied to clipboard
open suspend override fun <B : Any, R> handle(request: Request<B, R>): R
Link copied to clipboard
open suspend override fun <T> intercept(builder: RequestBuilder<T>)