Skip to content

Commit 5c4fcaf

Browse files
committed
MOBILE-2915 core: Fix multiple change password errors
1 parent 3f370f9 commit 5c4fcaf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/classes/site.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ export class CoreSite {
605605

606606
// Session expired, trigger event.
607607
this.eventsProvider.trigger(CoreEventsProvider.SESSION_EXPIRED, {}, this.id);
608-
// Change error message. We'll try to get data from cache.
608+
// Change error message. Try to get data from cache, the event will handle the error.
609609
error.message = this.translate.instant('core.lostconnection');
610610
} else if (error.errorcode === 'userdeleted') {
611611
// User deleted, trigger event.
@@ -614,17 +614,15 @@ export class CoreSite {
614614

615615
return Promise.reject(error);
616616
} else if (error.errorcode === 'forcepasswordchangenotice') {
617-
// Password Change Forced, trigger event.
617+
// Password Change Forced, trigger event. Try to get data from cache, the event will handle the error.
618618
this.eventsProvider.trigger(CoreEventsProvider.PASSWORD_CHANGE_FORCED, {}, this.id);
619619
error.message = this.translate.instant('core.forcepasswordchangenotice');
620620

621-
return Promise.reject(error);
622621
} else if (error.errorcode === 'usernotfullysetup') {
623-
// User not fully setup, trigger event.
622+
// User not fully setup, trigger event. Try to get data from cache, the event will handle the error.
624623
this.eventsProvider.trigger(CoreEventsProvider.USER_NOT_FULLY_SETUP, {}, this.id);
625624
error.message = this.translate.instant('core.usernotfullysetup');
626625

627-
return Promise.reject(error);
628626
} else if (error.errorcode === 'sitepolicynotagreed') {
629627
// Site policy not agreed, trigger event.
630628
this.eventsProvider.trigger(CoreEventsProvider.SITE_POLICY_NOT_AGREED, {}, this.id);

0 commit comments

Comments
 (0)