I have a few helpers for using Raise with Ktor… sh...
# arrow
c
I have a few helpers for using Raise with Ktor… should I open source them, or is there already something public to do this?
p
I have a similar
respond
helper that operates on
Raise<OutgoingContent>.() -> R
. Where it will respond with the conputation result with status 200 (or an overridden status)
❤️ 1
Might be nice to have an override that works over
Raise<E>
given a mapping
(E) -> OutgoingContent
c
There is
withError
for that
d
Why not just combine the parsing/retrieving with the ensure? That way you save extra lines... also the error type could be derived with an inline fun and reified types and there could be a default error returned that can be modified if needed...