title: RxJava Observable on error fetch items from database but still pass error through
body: <p>In my application I am getching data from api and if there is an error while doing that I would like to get data from database but also show error message on the screen.
  So how I thought about doing this is use something like <code>onErrorResumeNext</code>. I can get data from database using this but the problem is that <code>onError</code> is not called then and I can't show error message to user. So my code is:</p>
  
  <pre><code>override fun getData(): Observable&lt;List&lt;MyData&gt;&gt; {
      return getDataFromApi().onErrorResumeNext(getDataFromDatabase())
  }
  </code></pre>
  
  <p>How can I somehow fetch database on error and simultaneously know that error message needs to be displayed?</p>