title: How to continue the stream with error in Rx?
body: <p>I am developing an Android app using Kotlin, RxJava, Retrofit.
  I want to send Http Request to the server.</p>
  
  <p>PUT - update option of job</p>
  
  <p>POST - run the job</p>
  
  <p><a href="https://i.stack.imgur.com/8agBL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8agBL.png" alt="enter image description here"></a></p>
  
  <p>After the first request success, then I send a second request. So I used concatMap.</p>
  
  <pre><code>val updateJob = restService.updateJob(token, job.id, options) // PUT
  val runJob = restService.runJob(token, job.id) // POST
  
  updateJob.concatMap { runJob }
      .subscribeOn(Schedulers.io())
      .observeOn(AndroidSchedulers.mainThread())
      .subscribe({ job -&gt;
          Log.d(TAG, "runJob - success: $job")
      }, {
          Log.e(TAG, "runJob - failed: ${it.message}")
          it.printStackTrace()
      })
  </code></pre>
  
  <p>But I don't know in case of multiple jobs like below.</p>
  
  <p><a href="https://i.stack.imgur.com/4GGxs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4GGxs.png" alt="enter image description here"></a></p>
  
  <p>I have a job list.
  If one job's "update" request is failed, "run" request should not be sent.
  But the next job should continue.
  To do this, I make a code like below.</p>
  
  <pre><code>    Observable.fromIterable(jobs.toList())
      .concatMap { job -&gt;
          val updateJob = restService.updateJob(token, job.id, job)   // HTTP PUT Request
          val runJob = restService.runJob(token, job.id)  // HTTP POST Request
  
          updateJob.concatMap { runJob }
      }
      .window(1)
      .subscribeOn(Schedulers.io())
      .observeOn(AndroidSchedulers.mainThread())
      .subscribe({
          it.subscribeOn(Schedulers.io())
              .observeOn(AndroidSchedulers.mainThread())
              .subscribe({
                  Log.e(TAG, "run job - success")
              }, {
                  Log.e(TAG, "run job - failed - 1: ${it.message}")
                  it.printStackTrace()
              })
      }, {
          Log.e(TAG, "run job - failed - 2: ${it.message}")
          it.printStackTrace()
      })
  </code></pre>
  
  <p>I thought that "window" operator may be the solution.
  But it doesn't ...
  If some job is failed, the stream is over with onError().
  How should I solve this problem?</p>