diff --git a/assets/typescript/AuthenticationPageService.ts b/assets/typescript/AuthenticationPageService.ts index daf17f7b..78297cc5 100644 --- a/assets/typescript/AuthenticationPageService.ts +++ b/assets/typescript/AuthenticationPageService.ts @@ -106,12 +106,12 @@ export class AuthenticationPageService { case 'challenge-expired': this.switchToChallengeHasExpired(); break; - case 'invalid-request': - this.switchToNotificationFailed(); - break; case 'needs-refresh': this.reloadPage(); break; + default: + this.switchToStatusRequestError(); + break; } }; diff --git a/assets/typescript/__test__/AuthenticationPageService.test.ts b/assets/typescript/__test__/AuthenticationPageService.test.ts index 7d3d9db7..245c3ab2 100644 --- a/assets/typescript/__test__/AuthenticationPageService.test.ts +++ b/assets/typescript/__test__/AuthenticationPageService.test.ts @@ -161,7 +161,7 @@ describe('AuthenticationPageService', () => { if (!successCallback || !errorCallback) { throw new Error('Should have started status request'); } - const spy = jest.spyOn(context.authenticationPageService, 'switchToNotificationFailed'); + const spy = jest.spyOn(context.authenticationPageService, 'switchToStatusRequestError'); successCallback('invalid-request'); expect(spy).toBeCalled(); });