1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00
onError() now checks if the error message is empty and warn the user that the server is not reachable.
This commit is contained in:
Hector Sanjuan 2011-04-01 00:11:33 +02:00 committed by Jaime Melis
parent ec31ba2b51
commit 2d2bc3ad14

View File

@ -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: (.*)\.$/;