RxJava : How to handle error with zip operator ?
<p>I am using RxJava and RxAndroid with Retrofit2.</p>

<pre><code>Observable&lt;ResponseOne&gt; responseOneObservable = getRetrofitClient().getDataOne()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());

Observable&lt;ResponseTwo&gt; responseTwoObservable = getRetrofitClient().getDataTwo()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
</code></pre>

<p>Using zip operator as below on above two Observer. </p>

<pre><code> Observable&lt;ArrayList&lt;TestData&gt;&gt; testDataObservable = Observable.zip(responseOneObservable, responseTwoObservable, new Func2&lt;ResponseOne, ResponseTwo, ArrayList&lt;TestData&gt;&gt;() {
            @Override
                public ArrayList&lt;TestData&gt; call(ResponseOne responseOne, ResponseTwo responseTwo) {
                  ArrayList&lt;TestData&gt; testDataList = new ArrayList();
                      // Add test data from response responseOne &amp; responseTwo
                  return testDataList;
            } 
    })
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe(new Subscriber&lt;ArrayList&lt;TestData&gt;&gt;() {

        @Override
        public void onNext(ArrayList&lt;TestData&gt; testDataList) {

        }

        @Override
        public void onCompleted() {
            Log.d(TAG, "onCompleted" );
        }

        @Override
        public void onError(Throwable t) {
            Log.d(TAG, "onError Throwable: " + t.toString() );
        }
    });
</code></pre>

<p>If there is any error occurs during retrofit http call in  <code>responseOneObservable</code> and <code>responseTwoObservable</code> then it will directly call <code>onError</code> method of subscriber of <code>testDataObservable</code>.</p>

<p>I want to continue in zip operator's <code>call</code> method even if anyone of two observable got success response.</p>

<p>How to handle error response using <code>zip</code> operator ? </p>