user1276273
user1276273

Reputation: 1993

Angularjs - http request cancelled - reports 404

I'm having a problem with making an HTTP request in angular.

The request is taking a long time because it waits on a complex database query. If in the meantime the user clicks a link to a different page (we have a couple different single page apps), the request is getting cancelled (which is fine), but the status reported is 404. Now, the request in question should not fail in the ordinary course of business and so when it does we log it to an error reporting service (a different server). The problem is we are getting errors reported when they aren't errors, just cancelled http requests. Is this an error in angular? Is there a best practice to handle this?

Upvotes: 1

Views: 669

Answers (1)

Langdon
Langdon

Reputation: 20073

This is a bug in Angular that was introduced in 1.2.8. I've reproduced and reported the issue here:

https://github.com/angular/angular.js/issues/6074

Stick with 1.2.7 for now, unless you need something from 1.2.8 and beyond.

Upvotes: 1

Related Questions