ngrx effects error handling : <p>I have a very basic question concerning @ngrx effects: How to ignore an error that happens during the execution of an effect such that it doesn't affect future effect execution?</p>

<p>My situation is as follows: I have an action (LOGIN) and an effect listening to that action. If an error happens inside this effect, I want to ignore it. When LOGIN is dispatched a second time after this error, the effect should be executed a second time.</p>

<p>My first attempt to do this was:</p>

<pre><code>  @Effect()
  login$ = this.actions$
    .ofType('LOGIN')
    .flatMap(async () =&gt; {
      console.debug('LOGIN');
      // throw an error
      let x = [];x[0]();
    })
    .catch(err =&gt; {
      console.error('Error at login', err);
      return Observable.empty();
    });
</code></pre>

<p>Dispatching LOGIN the first time throws and catches the error, as expected. However, if I dispatch LOGIN a second time afterwards, nothing happens; the effect is not executed.</p>

<p>Therefore I tried the following:</p>

<pre><code>    .catch(err =&gt; {
      return this.login$;
    });
</code></pre>

<p>, but this results in an endless loop... Do you know how to catch the error without preventing effect execution afterwards?</p>
