diff --git a/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts b/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts index 10b19567946..f95af8573d0 100644 --- a/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts +++ b/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts @@ -540,7 +540,7 @@ export class LoginViaAuthRequestComponent implements OnInit, OnDestroy { * @param requestId * @private */ - private async retrieveAuthRequest(requestId: string): Promise { + private async retrieveAuthRequest(requestId: string): Promise { let authRequestResponse: AuthRequestResponse | undefined = undefined; try { // There are two cases here, the first being @@ -565,13 +565,11 @@ export class LoginViaAuthRequestComponent implements OnInit, OnDestroy { // If the request no longer exists, we treat it as if it's been answered (and denied). if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) { authRequestResponse = undefined; + this.logService.error("Auth request response not generated"); } else { this.logService.error(error); } - } - - if (authRequestResponse === undefined) { - throw new Error("Auth request response not generated"); + this.loading = false; } return authRequestResponse;