Angular 2: http.get in Observable not handling error
<p>I'm using observables for Http calls, which have been working fine, but then I changed up my controllers and noticed that my code apparently isn't handling errors. </p>

<p>Here is a look at the code from my service (SellingMenuService):</p>

<pre><code>public getVarieties(): Observable&lt;any&gt; {
    return this.http.get(this.varietyListUrl).map(response =&gt; {
        return response.json();
    }, (error: any) =&gt; {
        console.log(error);
        console.log('error finding variety list');
        // TODO: implement error handling here.
    });
}
</code></pre>

<p>And here is the relevant code from my component:</p>

<pre><code>constructor(public sellingMenuService: SellingMenuService) { }

getVarietyList(): void {        
    this.sellingMenuService.getVarieties().subscribe(res =&gt; {            
        console.log(res);
        this.varieties = res;
    });         
}
</code></pre>

<p>And here are some errors in my console:
<a href="https://i.stack.imgur.com/LCwHw.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/LCwHw.jpg" alt="enter image description here"></a></p>

<p>If I'm getting a 500 error, shouldn't those console logs from my service above get hit? Why don't they?</p>