Angular 2 redirect in http/rxjs catch callback causes TypeError: Cannot read property 'subscribe' of undefined
<p>When redirecting from the rxjs catch function I get the error: <code>EXCEPTION: TypeError: Cannot read property 'subscribe' of undefined</code></p>

<p>Here's the relevant part of <code>contactService</code>:</p>

<pre><code>getContacts () {
  ...
  return this.http.get(this.apiUrl, options)
                  .map(this.extractData, this)
                  .catch(err =&gt; {
                    this.handleError(err)
                  })
}
...
handleError (error) {
  if(error.status === 401){
    //the redirect works great, except, when added, I get the exception error
    this.router.navigate(['/login'])
    return Observable.of([])//this is my attempt based on link below
  }
  else{
    // In a real world app, we might send the error to remote logging infrastructure
    let errMsg = error.message || 'Server error'
    console.error(errMsg) // log to console instead
    return Observable.throw(errMsg)
  }
}
</code></pre>

<p>In the consuming component:</p>

<pre><code>...
ngOnInit(){
  this.getContacts()
}

getContacts(){
  this.contactService.getContacts().subscribe(
    (contacts) =&gt; { this.contacts = contacts },
    (error) =&gt; { this.errorMessage = error }
  )
}
</code></pre>

<p>This question (<a href="https://stackoverflow.com/questions/36861413/angular-2-how-to-handle-4xx-errors-with-redirect-in-observable">Angular 2. How to handle 4xx errors with redirect in Observable?</a>) would suggest that I'm doing this right, but maybe I'm missing something in my component?</p>