title: Unable to propagate error from a reactive method
body: <p>I have the following method where in one of the steps, I am calling the throwACheckedExceptionMethod() method.</p>
  <p>That method has a chance to throw a checked exception. Now I do not want to handle it here. I want the method which subscribes to it
  to handle it.</p>
  <p>How can I do that? Cos right now this does not compile cos I am not handling the error here.
  Adding doOnError() or throwing the error at the method level doesn't help either. I seem to be missing something about RX Java here.</p>
  <p>Could I get some help with this please? Thank you.</p>
  <pre><code>private Observable&lt;Void&gt; myMethod(Observable&lt;KafkaConsumerRecord&lt;String, String&gt;&gt; records) throws Exception /*Doesn't make a diff*/ {
      return client.rxGetConnection()
              .flatMapCompletable(connection -&gt; connection.rxSetAutoCommit(false)
                      .toCompletable()
                      .andThen(records.flatMapSingle(record -&gt; throwACheckedExceptionMethod(connection, record)).toCompletable()) // line in question
                      .andThen(connection.rxCommit().toCompletable())
                      .andThen(connection.rxSetAutoCommit(true).toCompletable())
              )
              .toObservable();
  }
  
  private Single&lt;UpdateResult&gt; throwACheckedExceptionMethod(SQLConnection connection, KafkaConsumerRecord&lt;String, String&gt; record) throws Exception {
      // some operation which may return a Single. 
      throw new Exception();
  }
  </code></pre>
  <p>The following is a possible option but I do not want to handle the error here as mentioned.</p>
  <pre><code>private Observable&lt;Void&gt; processTransaction(Observable&lt;KafkaConsumerRecord&lt;String, String&gt;&gt; records) {
  
      return client.rxGetConnection()
              .flatMapCompletable(connection -&gt; connection.rxSetAutoCommit(false)
                      .toCompletable()
                      .andThen(records.flatMapSingle(record -&gt; {
                          try {
                              return throwACheckedExceptionMethod(connection, record);
                          } catch (Exception throwables) {
                              throwables.printStackTrace();
                          }
                      })
                              .toCompletable())
                      .andThen(connection.rxCommit().toCompletable())
                      .andThen(connection.rxSetAutoCommit(true).toCompletable())
              )
              .toObservable();
  }
  </code></pre>