``` fun Application.main() { install(CallLoggi...
# ktor
s
Copy code
fun Application.main() {
    install(CallLogging)
    install(Routing) {
        get("/") {
            throw Exception("Foo")
            call.respondText("Hello, World!")
        }
    }
}
Produces a 404
o
I will take a look now
yep indeed
CallLogging
captures exception and doesn’t respond with 500, let me think… we can’t really send a 500 through a response pipeline in this case, because it could be response pipeline that is broken…
Also, headers could have been already sent…
s
I would expect it to have no effect on the pipeline so shouldnt it just rethrow the exception ?
Instead of swallowing it ?
o
Yes, but something should catch it upstream, and there is a place where it is transformed into 500, but it’s sent via response pipeline with all the potential issues. Need a little bit of refactoring, here, on to it today.
s
Sweet. Thanks !
o
For now I just moved failure processing from CallLogging to default host pipeline and it should be unified from now on – send back 500 on exception. The rest of the issue I’ve described here https://github.com/Kotlin/ktor/issues/82
pushed, please use local build while we are getting some more changes together for the next version. Hope to release it later this week.
s
👍