aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer RovegÄrd2012-12-31 13:03:49 +0100
committerPawel Kozlowski2013-01-03 20:49:43 +0100
commit74db36ee94addab519a7198bd987b44228309d59 (patch)
tree6717e4662f63956859a2fe97030b27c8c8d337ef
parent8d42ce85632b87bb75f89fa4b072ce798fb5a850 (diff)
downloadangular.js-74db36ee94addab519a7198bd987b44228309d59.tar.bz2
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
-rw-r--r--src/ng/http.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ng/http.js b/src/ng/http.js
index d840c78b..ed9e6712 100644
--- a/src/ng/http.js
+++ b/src/ng/http.js
@@ -208,8 +208,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>
*
@@ -218,6 +217,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
*