title: How to get errors from select in ngrx store?
body: <p>Let's say I have a few actions that my store can use: Load, LoadFail, and LoadSuccess.  All my actions are very simple, <code>LOAD = "load"</code>, <code>LOAD_FAIL = "load failed"</code>, and <code>LOAD_SUCCESS = "load success"</code>  I have a simple reducer that switches on these, like so:</p>
  
  <pre><code>export function reducer(state: State = initialState, action: Actions): State {
      switch (action.type) {
          case Actions.LOAD: {
              console.log("Actions.LOAD");
              return state;
          }
          case Actions.LOAD_FAIL: {
              console.log("Actions.LOAD_FAIL");
              store.error = action.payload;
              return state;
          }
          case Actions.LOAD_SUCCESS: {
              console.log("Actions.LOAD_SUCCESS");
              state.data = action.payload;
              return state;
          }
          default: {
              return state;
          }
      }
  }
  </code></pre>
  
  <p>I have an effects class that handles the load dispatch:</p>
  
  <pre><code>@Injectable()
  export class TestersEffects {
      constructor(
          private service: MyHttpService,
          private actions$: Actions
      ) {}
  
      @Effect() load$ = this.actions$.pipe(
          ofType(Actions.LOAD),
          switchMap(
              action =&gt; {
                  return this.service.load().pipe(
                      map(data =&gt; {
                          console.log("load$ fired");
                          return new TestersActions.LoadSuccess(data);
                      }),
                      catchError(error =&gt; {
                          console.log("error");
                          return of (new Actions.LoadFail(error));
                      })
                  )
              }
          )
      );
  }
  </code></pre>
  
  <p>Finally, I'm using all of this as such:</p>
  
  <pre><code>export class MyClass implements OnInit {
      data: any;
  
      constructor(private store: Store&lt;AppState&gt;) {}
  
      ngOnInit() {
          this.store.dispatch(new Actions.Load());
          this.store.select(store =&gt; store.State).subscribe(
              data =&gt; this.data = data,
              error =&gt; this.handleError(error)
          );
      }
  
      handleError(error) {
          //Whatever I'll do to handle this error
      }
  }
  </code></pre>
  
  <p>This code works fine when the server I'm requesting responds.  However, I need to handle the situations in which it doesn't respond.  I'm assuming that I simply don't understand the flow of ngrx/store well enough to fully comprehend how to get my errors, but I'm at a loss.  When I debug my code, the <code>catchError</code> in my effects class fires and sends off a LoadFail action, the reducer catches the action, sets the error and returns the state.  However, on my subscription side of things in <code>MyClass</code>, I never see anything.  I figure I must be missing something critical here, but all my Googling expertise has left me empty handed and I figured I'd brave Stack Overflow and beg for its wisdom on the matter.</p>
  
  <p>tl;dr: My store works just fine when the server responds, but when it doesn't, my errors aren't being sent to the subscription of a store state observable.</p>