better error message on login with wrong server address, fixes #15
This commit is contained in:
parent
54c87e58d8
commit
89142c54c0
4 changed files with 16 additions and 4 deletions
|
@ -215,7 +215,11 @@ Pond.login = function(server_url, user, password, callback) {
|
|||
if(xhr.status == 201) {
|
||||
callback(JSON.parse(xhr.responseText))
|
||||
} else {
|
||||
alert("error: " + typeof(xhr.status) + " " + xhr.statusText + "\n\n" + xhr.responseText)
|
||||
if(xhr.status == 0) {
|
||||
alert("Something went wrong, please check your credentials and the server address")
|
||||
} else {
|
||||
alert("error: " + typeof(xhr.status) + " " + xhr.statusText + "\n\n" + xhr.responseText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue