Hi, I've never used ZIO before so maybe this is a ...
# arrow
c
Hi, I've never used ZIO before so maybe this is a silly question, but with
arrow.fx.coroutines.retry
the doc's say "The effect is executed once, and if it fails..." How does it determine failure with the effect? I've managed to achieve what I want with
repeat
and
schedule.doUntil { it.isRight() }
but it would make a little more sense to "retry a network request until is succeeds or fails 5 times" than to "repeat a network request until it succeeds or fails 5 times"
s
you build your schedule once... • the same schedule used with
repeat
will repeat the effect if it succeeds • the same schedule used with
retry
will retry the effect in case of failure
a
How does it determine failure with the effect?
I believe is handled by exceptions, so if the effect you run throws, then it’ll be retried
👍 1
c
That makes sense thank you. I see my fail was more to do with KotlinScript and Intelij than Arrow
👍 1