that's either-based flows
# arrow
p
that's either-based flows
c
Is there a function somewhere to convert from an exception-based flow (eg. Requests from Ktor) to an Either-based flow? I guess there's always the option to try-catch and create the Either myself, but from what you guys I've done so far, there's probably some nice syntax sugar ^^
p
Either.catch
and
handleErrorWith
😄
😍 1
Either.catch used to be non-suspend. As exceptions are side-effects, we put it inside suspend. It was controversial, you can always reproduce the function without it as you say.
k
Wait. That's interesting.
Is the expectation that you'd use this instead of
try { .. } catch { .. }
blocks?