1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-12 09:17:41 +03:00

feature #2739: Add error handling in opennebula.js

This commit is contained in:
Daniel Molina 2014-07-15 11:20:14 +02:00
parent 0763327195
commit 606f0df15a

View File

@ -1523,11 +1523,12 @@ var OpenNebula = {
data: {timeout: timeout},
dataType: "json",
success: function(response){
return callback ?
callback(request, response) : null;
$(".marketplace_error_message").hide();
return callback ? callback(request, response) : null;
},
error: function(res){
return notifyError("Cannot connect to OpenNebula Marketplace");
$(".marketplace_error_message").show();
return callback_error ? callback_error(request, OpenNebula.Error(res)) : null;
}
});
}