title: Angular 2 Promise throw error
body: <p>I am trying to make a service that handles contacts in Angular 2. This is what i got so far.</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http } from '@angular/http';
  
  import 'rxjs/add/operator/toPromise';
  
  @Injectable()
  export class ContactsService {
  
    constructor(private http: Http) { }
  
    addContact(contact): Promise&lt;any&gt; {
      return this.http
        .post('http://localhost:8000/contacts', contact)
        .toPromise()
        .then(response =&gt; response.json())
        .catch(error =&gt; error.json());
    }
  }
  </code></pre>
  
  <p>Now the service works fine, if i get a <code>400+</code> status code on the response, the code goes to the <code>catch</code> stare, if it's <code>200</code> code it goes to <code>then</code> state and returns the response.</p>
  
  <p>But when i use it inside a component, it goes to <code>then</code> state no matter if the respone is ok or not.</p>
  
  <pre><code>addingContact() {
    this.contactsService
      .addContact(this.user)
      .then(
        (contactx) =&gt; { console.log('THEN = ' + JSON.stringify(contactx)); },
        (err) =&gt; { console.log('CATCH = ' + JSON.stringify(err)); }
      );
  }
  </code></pre>
  
  <p>Is there something i'm missing, should i throw something on the service so the code goes to the error start incase i get a <code>400+</code> status code ?</p>
  
  <p>Thank you in advance, Daniel!</p>