This commit is contained in:
Jeena Paradies 2012-11-12 04:05:08 +01:00
parent acd3968fa9
commit 3507f34210
6 changed files with 124 additions and 55 deletions

View file

@ -60,7 +60,7 @@ function(jQuery, HostApp, Hmac) {
});
}
Paths.findProfileURL = function(entity, callback) {
Paths.findProfileURL = function(entity, callback, errorCallback) {
jQuery.ajax({
url: entity,
@ -80,11 +80,14 @@ function(jQuery, HostApp, Hmac) {
if (profile_url) {
callback(profile_url);
} else {
if(errorCallback) errorCallback(entity + " has no profile URL");
}
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert("findProfileURL " + xhr.statusText + " (" + entity + "): " + xhr.responseText);
if (errorCallback) errorCallback(xhr.statusText + " - " + xhr.responseText)
}
});
}