Angular - Is .finally() Called At the End of Every Path in a Chained Promise Decision Tree?
<p>I have the following chained sequence of promises:</p>

<pre><code>$scope.promisesInProgress = true
myService.myFirstPromise(id)
    .then(function(data){
        $scope.firstResponse = data;
        return myService.mySecondPromise(id);
    })
    .then(function(data){
        $scope.secondResponse = data;
    })
    .finally(function(){
        $scope.promisesInProgress = false;
    });
</code></pre>

<p>Is the <code>finally()</code> callback function being called at the very end no matter what the success / failure of the previous two promises are?  </p>

<p>For example, if <code>myFirstPromise()</code> returned a 400 response, <code>mySecondPromise()</code> will never be called - but I assume the <code>finally()</code> block would still be thrown?  The same should be true if <code>mySecondPromise()</code> returns a 400 (and <code>$scope.secondResponse</code> is never set) and if both promises return 200s.</p>