title: Short-circuit a flatMap if an exception occurs
body: <p>I have a <code>flatMap</code> that runs a series of HTTP calls to register a user, retrieve their profile, and some other things.  I would like to notify <code>onError</code> in my <code>subscription</code> with a particular error message depending on which stage of the <code>flatMap</code> an error occurs.  Maybe the registration was successful, but retrieving the created profile was not.  How could I accomplish this such that my <code>flatMap</code> stops all the subsequent calls once an error happens? </p>
  
  <p>Here is some pseudocode of my <code>Observable</code> and <code>Subscription</code>:</p>
  
  <pre><code>Retrofit.registerUser()
          .subscribeOn(Schedulers.io())
          .observeOn(AndroidSchedulers.mainThread())
          .flatMap({
              return Retrofit.authenticate();
          })
          .subscribeOn(Schedulers.io())
          .observeOn(AndroidSchedulers.mainThread())
          .flatMap({
              return Retrofit.retrieveProfile() 
          })
          .subscribeOn(Schedulers.io())
          .observeOn(AndroidSchedulers.mainThread())
          .flatMap({
              return Retrofit.retrieveOtherStuff()
          })
          .subscribeOn(Schedulers.io())
          .observeOn(AndroidSchedulers.mainThread())
          .subscribe(new Action1 {
  
          }, new Action1&lt;Throwable&gt;() {
            // I would like to display the error to my user here
          }));
  </code></pre>