From 87af0cd0f21d4d44821bc195834e2f72a55d6891 Mon Sep 17 00:00:00 2001 From: ryoii Date: Sat, 22 Feb 2020 16:37:59 +0800 Subject: [PATCH] http handle any throwable exception --- .../main/kotlin/net/mamoe/mirai/api/http/route/BaseRoute.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/route/BaseRoute.kt b/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/route/BaseRoute.kt index 4292c972a..474095612 100644 --- a/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/route/BaseRoute.kt +++ b/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/route/BaseRoute.kt @@ -21,6 +21,7 @@ import io.ktor.http.HttpStatusCode import io.ktor.http.content.PartData import io.ktor.request.receive import io.ktor.response.defaultTextContentType +import io.ktor.response.respond import io.ktor.response.respondText import io.ktor.routing.Route import io.ktor.routing.route @@ -141,6 +142,9 @@ internal inline fun Route.intercept(crossinline blk: suspend PipelineContext