Join Slack
Powered by
Say (just an example) I access an api flow that ne...
# coroutines
d
dave08
09/11/2019, 12:56 PM
Say (just an example) I access an api flow that needs to log in to start working with it, how can I catch the NotLoggedIn exception and then retry the original flow?
e
elizarov
09/11/2019, 1:10 PM
Take a look at this operator:
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/retry.html
d
dave08
09/11/2019, 1:11 PM
So inside the predicate lambda I should subscribe to the login flow?
dave08
09/11/2019, 1:13 PM
I saw that operator, but I thought the predicate lambda was just for checking or deciding in how long to run the retry...
3
Views
Open in Slack
Previous
Next