I seem to recall that `receive` is not allowed to ...
# ktor
z
I seem to recall that
receive
is not allowed to be called multiple times, so this should be illegal to do? Presumption is that Ive already called
receive
in my routes before the error is thrown.
Copy code
install(StatusPages) {
    exception<Throwable> { call, throwable ->
        val errorOrNull = call.receiveNullable<Error>() // Multiple receive not allowed, IIRC?
    }
}
a
The first receiving consumes the request body, so the consequent calls wouldn't work unless the DoubleReceive plugin is installed.
z
Awesome, Ill use DoubleReceive for this! Thank you 😃