title: Error handling stop propagation after router.navigate Angular 2
body: <p>I've implemented error handling on server side to return json. And now I'm working on error handling in Angular 2.</p>
  
  <p>My component is:</p>
  
  <pre><code>onClick() {
          this.dataService.getData()
              .subscribe((response: Json) =&gt; {
                  console.log("some text");
                  if(response.status !== 'fail') {
                      ...
                  }
              });
      }
  </code></pre>
  
  <p>My <strong>DataService.ts</strong> is:</p>
  
  <pre><code>getData(): Observable&lt;Json&gt; {
          return this.http
              .get(this.getDataUrl)
              .map((response: Response) =&gt; {
                  return this.responseService.extractJson(response);
              })
              .catch(error =&gt; {
                  return this.errorService.handleError(error);
              });
      }
  </code></pre>
  
  <p>And <strong>ResponseService.ts</strong>:</p>
  
  <pre><code>extractJson(response: Response): any {
          let json: Json = response.json();
          if (json.status === 'success') {
              return json;
          } else {
              this.router.navigate(['something-went-wrong']);
              return null;
          }
      }
  </code></pre>
  
  <p>But app continues to execute code further in <em>subscribe</em> section, so I see in browser console <code>some text</code> and error <code>Cannot read property 'status' of null</code>. How can I stop further propagation after <code>router.navigate</code>? What should I do or return after <code>router.navigate</code> for that?</p>