docs($http): clarify documentation on error status codes

Modify the documentation for $http to correspond to what Angular
considers a success status code.

Closes #1693
This commit is contained in:
Per Rovegård 2012-12-31 13:03:49 +01:00 committed by Pawel Kozlowski
parent 2f4967f100
commit f3188c1d09

View file

@ -172,8 +172,7 @@ function $HttpProvider() {
* }).
* error(function(data, status, headers, config) {
* // called asynchronously if an error occurs
* // or server returns response with status
* // code outside of the <200, 400) range
* // or server returns response with an error status.
* });
* </pre>
*
@ -182,6 +181,10 @@ function $HttpProvider() {
* an object representing the response. See the api signature and type info below for more
* details.
*
* A response status code that falls in the [200, 300) range is considered a success status and
* will result in the success callback being called. Note that if the response is a redirect,
* XMLHttpRequest will transparently follow it, meaning that the error callback will not be
* called for such responses.
*
* # Shortcut methods
*