Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs($http): Add explanation for error status #14459

Closed
wants to merge 1 commit into from

Conversation

AbhishekGarg
Copy link
Contributor

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.

@googlebot
Copy link

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. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

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. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@gkalpak
Copy link
Member

gkalpak commented Apr 19, 2016

@AbhishekGarg, we need a signed CLA before we can merge this.
Also, please add Fixes #11945 at the end of your commit message, so that issue it closed when/if this is merged.

@AbhishekGarg
Copy link
Contributor Author

I have signed the CLA.
@gkalpak I'll make the suggested changes and changes for successful build asap.

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

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
@AbhishekGarg AbhishekGarg force-pushed the patch-2 branch 2 times, most recently from f9a4290 to 272f1c8 Compare April 21, 2016 06:36
@AbhishekGarg
Copy link
Contributor Author

@gkalpak Updated commit message and changed for travis-ci check.
Could you please have a look?

* 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.
Copy link
Member

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).

@gkalpak gkalpak closed this in 0727bfc Apr 22, 2016
gkalpak pushed a commit that referenced this pull request Apr 22, 2016
Add explanation for error status codes in `$http` and mention negative codes normalization.
This alleviates confusion about which status codes will trigger the error callback and what values
to expect in such callbacks.

Fixes #11945

Closes #14459
@gkalpak
Copy link
Member

gkalpak commented Apr 22, 2016

I tweaked it a bit and merged. Thx !

@AbhishekGarg AbhishekGarg deleted the patch-2 branch June 22, 2020 05:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants