title: How to continue with the same stream when a node is a rejected promise?
body: <p>I'm using <code>redux-observable</code> in order to dispatch an action with a transformation of some promise result.</p>
  
  <p>Let's say I have an API call like this:</p>
  
  <pre><code>const fetchSomething = () =&gt; callAndReturnPromise('some-endpoint')
  </code></pre>
  
  <p>Using these action creators:</p>
  
  <pre><code>const fetchSomethingSuccess = response =&gt; ({ type: 'SUCCESS', payload: response })
  const fetchSomethingError = error =&gt; ({ type: 'ERROR', payload: error })
  </code></pre>
  
  <p>I can create actions for both cases, when <code>fetchSomething</code> is resolved or rejected.</p>
  
  <p>I want my epic to take all 'FETCH' actions and use the <code>fetchSomething</code> function to put a new node with the resolved or rejected value of the promise using the proper action creators.</p>
  
  <p>My epic is looking like this:</p>
  
  <pre><code>const fetchSomethingEpic = action$ =&gt;
      action$
          .ofType('FETCH')
          .switchMap(() =&gt; 
              Observable
                  .fromPromise(fetchSomething())
                  .map(fetchSomethingSuccess)
                  .catch(error =&gt; Observable.of(fetchSomethingError(error)))
      );
  </code></pre>
  
  <p>The problem is that it stops working when an error occurs.</p>
  
  <p>When the promise generated by <code>fetchSomething</code> is being resolved, everything just goes fine, a new action is dispatched with the transformation passed with map. But when the the promise is rejected, no action is dispatched after the 'FETCH'</p>
  
  <p>--</p>
  
  <p>More info</p>
  
  <p>The <code>callAndReturnPromise('some-endpoint)</code> looks like this:</p>
  
  <pre><code>const callAndReturnPromise = endpoint =&gt; new Promise((resolve, reject) =&gt; {
      fetch(endpoint)
          .then(response =&gt; {
              if (checkIsCool(response)) {
                  resolve(response);
              } else {
                  reject(response)
              }
      })
  })
  </code></pre>
  
  <p>After debugging I get something like this, let's name the actions in the stream with F, S, E (fetch, success and error)</p>
  
  <pre><code>----F----S------F-------F------S
                       ^ there occurred an error but no action was sent
  </code></pre>