For some reason, the desktop version of my app works fine, but the mobile one does not. I’m making this call from the client:
$.ajax(`${apiBaseUrl}/get_recent_posts`, {
dataType: 'jsonp'
}).done(function (data) {
console.log('done, firing callback');
callback(data.posts);
}).fail(function (jqXHR, textStatus, errorThrown) {
console.log('FAIL. dumping everything!');
console.log(jqXHR);
console.log(textStatus);
console.log(errorThrown);
}).always(function (jqXHR, textStatus, errorThrown) {
console.log('always?');
});
And getting this error in the Safari console:
Failed to load resource: the server responded with a status of 401 (Unauthorized
It’s interesting to note that neither done
, fail
, nor always
fire. Why would the desktop version work but the mobile one not?