From 74db36ee94addab519a7198bd987b44228309d59 Mon Sep 17 00:00:00 2001 From: Per RovegÄrd Date: Mon, 31 Dec 2012 13:03:49 +0100 Subject: 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 --- src/ng/http.js | 7 +++++-- 1 file 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. * }); * * @@ -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 * -- cgit v1.2.3