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
|
@ -175,7 +175,11 @@ TinyTinyRSS.login = function(server_url, user, password, callback) {
|
|||
if(xhr.status == 200) {
|
||||
callback(JSON.parse(xhr.responseText).content)
|
||||
} else {
|
||||
alert("error: " + xhr.status + " " + xhr.statusText)
|
||||
if(xhr.status == 0) {
|
||||
alert("Something went wrong, please check your credentials and the server address")
|
||||
} else {
|
||||
alert("error: " + xhr.status + " " + xhr.statusText)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue