Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a258837

Browse files
author
Parth Shah
committedSep 21, 2015
fixing login error when user does not exist
1 parent 0aba724 commit a258837

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎app/account/login/login.controller.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@
9494
switch (resp.status) {
9595
case "ACCOUNT_INACTIVE":
9696
window.location.href = "https://www." + CONSTANTS.domain + "/account-inactive/";
97+
case "USER_NOT_REGISTERED":
9798
default:
99+
vm.socialLoginError = 401;
98100
break;
99101
}
100102
});

‎app/services/tcAuth.service.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080
},
8181
function(resp) {
8282
$log.debug(JSON.stringify(resp));
83+
// 401 status here implies user is not registered
84+
if (resp.status === 401) {
85+
reject({
86+
status: "USER_NOT_REGISTERED"
87+
});
88+
}
8389
if (resp.data.result.content.toLowerCase() === 'account inactive') {
8490
reject({
8591
status: "ACCOUNT_INACTIVE"

0 commit comments

Comments
 (0)
This repository has been archived.