These are chat archives for ReactiveX/RxJava

3rd
May 2018
nihiluis
@nihiluis
May 03 2018 14:28
suppose I launch a http request and get a maybe which I turn to an Observable (right now), which method should I use on the observable to repeat the request if the response has an errors field?
I thought repeatWhen would be good, but it only offers me an Observable<Any> to check if it has an errors field. I'm not sure if I can use it
Ignacio Baca Moreno-Torres
@ibaca
May 03 2018 16:12
Not sure this is the best option, but maping the response to itself but throwing an exception if is an error response (kind of KnownServerResponseError) and using the retry operator to handle both request and response error might work
Ignacio Baca Moreno-Torres
@ibaca
May 03 2018 16:19
Idealy this should be done by some request utility, not per request endpoint