mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 541766 - Logging in with email address kinda works but not
Detect finding cluster failure due to invalid username and treat like failed login.
This commit is contained in:
parent
eaf5249121
commit
7867da3476
@ -432,10 +432,15 @@ WeaveSvc.prototype = {
|
||||
_findCluster: function _findCluster() {
|
||||
this._log.debug("Finding cluster for user " + this.username);
|
||||
|
||||
let fail;
|
||||
let res = new Resource(this.userAPI + this.username + "/node/weave");
|
||||
try {
|
||||
let node = res.get();
|
||||
switch (node.status) {
|
||||
case 400:
|
||||
Status.login = LOGIN_FAILED_LOGIN_REJECTED;
|
||||
fail = "Find cluster denied: " + this._errorStr(node);
|
||||
break;
|
||||
case 404:
|
||||
this._log.debug("Using serverURL as data cluster (multi-cluster support disabled)");
|
||||
return this.serverURL;
|
||||
@ -451,8 +456,9 @@ WeaveSvc.prototype = {
|
||||
} catch (e) {
|
||||
this._log.debug("Network error on findCluster");
|
||||
Status.login = LOGIN_FAILED_NETWORK_ERROR;
|
||||
throw e;
|
||||
fail = e;
|
||||
}
|
||||
throw fail;
|
||||
},
|
||||
|
||||
// gets cluster from central LDAP server and sets this.clusterURL
|
||||
|
Loading…
Reference in New Issue
Block a user