From 2d2bc3ad14425ed44b4e8c230c58900676527d2d Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 1 Apr 2011 00:11:33 +0200 Subject: [PATCH] Fixes bug #518 onError() now checks if the error message is empty and warn the user that the server is not reachable. --- src/sunstone/public/js/sunstone-util.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index c747649489..7a04bc0525 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -233,6 +233,11 @@ function onError(request,error_json) { if (error_json.error.http_status=="401") { window.location.href = "/login"; }; + + if (!message){ + notifyError("Cannot contact server: is Sunstone server running and reachable?"); + return false; + } //Parse known errors: var action_error = /^\[(\w+)\] Error trying to (\w+) (\w+) \[(\w+)\].*Reason: (.*)\.$/;