I'm fetching data from the sharepoint
list using angularjs
in regular intervals. After sometime, I'm getting error in the console as SCRIPT7002: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff.
I'm using IE 10
as browser. Any idea about this error ?
Please find the method which i repeatedly calls to get data below.
// Method to get all the notifications for the user
var getUserNotifications = function () {
// Create a deferred object
var deferred = $q.defer();
// Url for getting the list with filters
var url = _spPageContextInfo.webServerRelativeUrl +
"_api/web/lists/getByTitle('" + list + "')/items?" + filters;
// API call to get the notification items from list
var method = $http({
method: "GET",
url: url,
headers: {
"Accept": "application/json;odata=verbose"
}
});
// Executing the method
method.then(
// Success function
function (data) {
var d = data.data.d.results;
notification = d;
// If timer is not started, then start it.
if (!isTimerStarted) {
setInterval(function () {
getUserNotifications();
}, 3000);
isTimerStarted = true;
}
deferred.resolve(d);
},
// Error
function (err) {
deferred.reject("Error");
}
)
return deferred.promise;
};