I am also experiencing this problem. My angular verison is 1.2.9. I have
put my client in airplane mode and it returns a 404 as a result of a rest
call using $http.
Chuck
On Wednesday, January 29, 2014 7:00:42 AM UTC-6, Geir Gullestad Pettersen
wrote:
>
> I'm using AngularJS for a singlepage app with a REST backend. It should
> handle networking issues gracefully so I had the following code running on
> 1.2.2:
>
> $http(...).success(function (data, status, headers, config) {
>
> // do success stuff
>
> })
> .error(function (data, status, headers, config) {
>
> if (status == 0) {
> // handle lower level communication issue, e.g.
> ask user to check network setup, etc and try again
> }
> else {
> // handle 40x errors (user was not authorized,
> referenced a resources that doesn't exist, etc)
> }
> });
>
>
> When i was on 1.2.2 the status was 0 whenever the server was down. i could
> then display a message to the user that he had networking issues (possibly
> disconnected wlan, mobile data, etc).
>
> However, after upgrading to 1.2.10 i get status 404 when there are
> communication issues, instead of 0 as before.
>
> Is this intentional or a bug? If it is intentional it makes it a lot
> harder for to distinguish between network layer errors and application
> errors since 404 is also used by the REST interface to report resources
> that doesnt exist.
>
> Any thoughts?
>
> Thanks!
>
>
> /Geir
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.