From 57752392518704a15bacc0df1ab7f70591338050 Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Mon, 18 Aug 2025 16:26:18 -0700 Subject: [PATCH] return undefined if error --- .../login-via-auth-request.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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;