Hi! Is there a specific reason why exceptions thro...
# ktor
b
Hi! Is there a specific reason why exceptions thrown in
Copy code
call.respondOutputStream{ throw BlaException()}
are not recoverable, meaning that they dont get propagated to the status pages handler?
m
sounds like a bug!
b
it could also be a timing problem .. so at the time call.respondOutputStream does something the negotiation is already in progress or something like that
as a workaround i write to an temporary bytearrayoutput stream and then do
Copy code
call.respondOutputStream {
    ByteArrayInputStream(output.toByteArray()).copyTo(this)
}
which is maybe not a good idea because i guess its a blocking operation