Nikky
02/25/2022, 2:29 AMcall.respondText(text = cause.message, status = HttpStatusCode.InternalServerError)
seems to not trigger a http response and the request is just hangingAleksei Tirman [JB]
02/25/2022, 8:03 AMembeddedServer(CIO, port = 4444) {
install(StatusPages) {
exception { call, cause: Throwable ->
call.respondText(text = cause.message!!, status = HttpStatusCode.InternalServerError)
}
}
routing {
get("/") {
throw Exception("some error")
}
}
}.start(wait = true)
Could you please share a code snippet?Nikky
02/25/2022, 10:54 AMcall.respondBytesWriter {}
and passing the write channel to some function.. in there it might throw..
i restructured to code to instead return a Memory
and feed that into the write channel
now it works