Open APIGen Status Pages Interop
Wrapper for Status pages that handles exceptions and generates documentation in OpenAPI. This is useful for default error pages.
Functions
Link copied to clipboard
Registers a handler for exception type TThrowable and returns a status page
inline fun <TThrowable : Throwable, TResponse> exception(status: HttpStatusCode, example: TResponse? = null, noinline gen: (TThrowable) -> TResponse)
Registers a handler for exception type TThrowable and returns a status page that includes a response body of type TResponse.