From 606f0df15ac474b57f3f43b8ec45d7da61a6f801 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Tue, 15 Jul 2014 11:20:14 +0200 Subject: [PATCH] feature #2739: Add error handling in opennebula.js --- src/sunstone/public/js/opennebula.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sunstone/public/js/opennebula.js b/src/sunstone/public/js/opennebula.js index 53a71cce6f..6720273670 100644 --- a/src/sunstone/public/js/opennebula.js +++ b/src/sunstone/public/js/opennebula.js @@ -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; } }); }