title: Angularjs - $http promise error handling
body: <p>I'm having a problem. I'm trying to make a $http call with the .then function insted .sucssess and .error. But although i change the url of the request to a non existing one, it is always executing the succes handler:</p>
  
  <pre><code>$http.get('data/myjson.json').then(onSuccess, onError);
  
  onSuccess(data){};
  onError(data){};
  </code></pre>
  
  <p>Also, the data parameter has a status of 404, indicating the failure, but the onError got never execute.</p>
  
  <p>some body can explain how this really work?</p>
  
  <p>thanks!</p>