-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs($http): Add explanation for error status #14459
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
@AbhishekGarg, we need a signed CLA before we can merge this. |
I have signed the CLA. |
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
Add explanation for error status codes in $http call and line about normalization to zero in case of negative status code. This alleviates confusion about status codes for which error callback would be called and final values to be expected from an erroneous call. Fixes angular#11945
f9a4290
to
272f1c8
Compare
@gkalpak Updated commit message and changed for travis-ci check. |
* called for such responses. | ||
* will result in the success callback being called. Response status code other than | ||
* the mentioned ones is considered as error status. The error callback is called in such case. | ||
* Also, any negative status code is normalized to zero. Other codes are returned as such. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only codes < -1 are normalized. -1 is returned as is (and usually, means aborted, e.g. via timeout).
I tweaked it a bit and merged. Thx ! |
Add explanation for error status codes in $http call and line about normalization to zero in case of negative status code.
This alleviates confusion about status codes for which error callback would be called and final values to be expected from an erroneous call.