MOBILE-2352 login: Fix error handling in login
parent
27129c373e
commit
fb59c5944b
|
@ -950,12 +950,10 @@ export class CoreLoginHelperProvider {
|
||||||
* @param {any} error Error object containing errorcode and error message.
|
* @param {any} error Error object containing errorcode and error message.
|
||||||
*/
|
*/
|
||||||
treatUserTokenError(siteUrl: string, error: any): void {
|
treatUserTokenError(siteUrl: string, error: any): void {
|
||||||
if (typeof error == 'string') {
|
if (error.errorcode == 'forcepasswordchangenotice') {
|
||||||
this.domUtils.showErrorModal(error);
|
this.openChangePassword(siteUrl, error.error || error.message || error.body || error.content);
|
||||||
} else if (error.errorcode == 'forcepasswordchangenotice') {
|
|
||||||
this.openChangePassword(siteUrl, error.error);
|
|
||||||
} else {
|
} else {
|
||||||
this.domUtils.showErrorModal(error.error);
|
this.domUtils.showErrorModal(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue