How to handle errors in an Observable chain conditionally?
Using onErrorResumeNext
I guess you can achieve what you want
observable.onErrorResumeNext(error -> {
if(errorOk)
return Observable.just(ok)
else
return Observable.error(error)
})
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.trampoline())
.subscribe(item -> onNextAction(),
error -> onErrorAction()
);