title: $q promise error callback chains
body: <p>In the following code snippet <code>error 1</code> and <code>success 2</code> will be logged.  How can I can I propagate error callbacks being invoked rather than the success callbacks being invoked if the original deferred is rejected.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>angular.module("Foo", []);
  angular
  .module("Foo")
  .controller("Bar", function ($q) {
      var deferred = $q.defer();
        deferred.reject();
  
        deferred.promise
            .then(
                /*success*/function () { console.log("success 1"); },
                /*error*/function () { console.log("error 1"); })
            .then(
                /*success*/function () { console.log("success 2"); },
                /*error*/function () { console.log("error 2"); });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt;
  &lt;div ng-app="Foo"&gt;
      &lt;div ng-controller="Bar"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>