Hi Sander! Perfect!!! Thank you very much for your help!! I just upgraded to Angular 1.2.9 and i finally get a useful response status code.
Best regards Michael Am Donnerstag, 30. Januar 2014 04:15:40 UTC+1 schrieb Sander Elias: > > Hi Michael, > > The response object in AngularJS looks like this: >> Object {data: "", status: 0, headers: function, config: Object} >> >> What I would expect is status code 302 and even the redirect location, so >> that I could handle the redirect to the login-page in Angular myself... >> > Well, I was assuming you got redirected by the browser. This is way easier > to manage! You gave already the solution too! > > On Wednesday, January 29, 2014 3:28:50 PM UTC+1, Michael Hunziker wrote: >> >> What I could do is implement an httpInterceptor which will handle >> response errors with status code 0. As soon as I get such a response I >> could trigger a $window.location.reload. This would again trigger the proxy >> and he would redirect us to the login page. >> > Be warned that in the new versions 1.2.9+ you will get an 404 instead of a > 0, and yo should also check for the string 'not allowed access' inside > your status. Just to make sure you don't direct to the login page on > anything then the login failure. > > Regards > Sander > > -- 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 angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.