-
Notifications
You must be signed in to change notification settings - Fork 27.5k
$http error callback doesn't have xhr.statusText #2335
Comments
+1 Just ran into this. |
@jimlyndon thx for the fix, i hope your pull request will be accepted. |
@jimlyndon thank you! |
No prob. I have a story on the wall waiting for this fix as well. So we'll see :) |
Hi Guys, Anyone know if this is fixed in the trunk? |
We're working with another team's backend that we don't really have control over and it would be really nice if we could leverage that system's existing error messages by using the status text. |
The PR mentioned above hasn't been pulled, and I don't know if the fix has But it's an easy fix and super useful. Feel free to comment on the PR
|
Makes xhr status text accessible is $http success/error callback. See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext Closes angular#2335
Yep just hit this issue as well = hopefully will be rolled in soon. |
Ug, same here, need this. 👍 |
+1 |
Same here, we also need to get the status text of the responses. |
statusText is very important, please add it to response |
+1 |
+1, just hit this. |
Makes xhr status text accessible is $http success/error callback. See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext Closes angular#2335
Makes xhr status text accessible is $http success/error callback. See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext Closes angular#2335
Makes xhr status text accessible is $http success/error callback. See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext Closes angular#2335
Makes xhr status text accessible is $http success/error callback. See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext Closes angular#2335
Makes xhr status text accessible is $http success/error callback. See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext Closes angular#2335
Makes xhr status text accessible is $http success/error callback. See www.w3.org/TR/XMLHttpRequest/#dom-xmlhttprequest-statustext Closes #2335 Closes #2665 Closes #6713
+1 |
I faced the same problem on version 1.2.24 |
Is this not available in 1.2.24: See 32c09c1 |
same problem on version 1.3.0 for a temporary solution for myself, changed source code as the following:
|
@owen26 we probably arent going to extend those in core because if we ever want to add more it just gets really sucky. why not just use |
At least it should be documented somewhere saying statusText will only be available in .then() and not in .success()/.error(). |
here's the work around to get StatusText (as pointed out that some moblie browsers strip out DATA from successfull responses: http://stackoverflow.com/a/28470163/1586498 |
Not sure if it'll work for everyone, but you can use |
+1 to get this fixed |
There is no way to get XHR statusText in $http error callback. Currently this only returns status(number - statusCode).
It would be really helpful to get status text to display the server error message in the browser.
Like examples,
404 - Resource not found
400 - User ID already exists
The text was updated successfully, but these errors were encountered: