Can't alert $getJSON .fail:
this.flickrPics = ko.observableArray();
ko.computed(function() {
$.getJSON(
'https://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?',
{
tags : data.name,
format : 'json'
})
.done(function(response) {
for (var i = 0; i < 10; i++) {
self.flickrPics.push(response.items[i].media.m);
}
})
.fail(function(error) {
alert(error + 'error');
// $('.pics-box h2').text("sorry, pictures cant be loaded at the moment");
});
}, this);
Everything works perfect except for .fail. If i mess up with url, nothing happens, only get console errors of failed ajax calls. What am I doing wrong?