From c666d78642ac6af933bfee6bca45b0815a2ed86e Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Fri, 2 Oct 2020 15:53:34 -0400 Subject: [PATCH] 16947: Don't show misleading session validate errors. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- src/services/auth-service/auth-service.ts | 4 ++-- src/store/auth/auth-action-session.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/auth-service/auth-service.ts b/src/services/auth-service/auth-service.ts index 5e382fba..9fc738bc 100644 --- a/src/services/auth-service/auth-service.ts +++ b/src/services/auth-service/auth-service.ts @@ -92,7 +92,7 @@ export class AuthService { window.location.assign(`${this.baseUrl || ""}/logout?return_to=${currentUrl}`); } - public getUserDetails = (): Promise => { + public getUserDetails = (showErrors?: boolean): Promise => { const reqId = uuid(); this.actions.progressFn(reqId, true); return this.apiClient @@ -114,7 +114,7 @@ export class AuthService { }) .catch(e => { this.actions.progressFn(reqId, false); - this.actions.errorFn(reqId, e); + this.actions.errorFn(reqId, e, showErrors); throw e; }); } diff --git a/src/store/auth/auth-action-session.ts b/src/store/auth/auth-action-session.ts index 4568d77e..0f85e9ac 100644 --- a/src/store/auth/auth-action-session.ts +++ b/src/store/auth/auth-action-session.ts @@ -114,7 +114,7 @@ export const validateCluster = async (config: Config, useToken: string): const svc = createServices(config, { progressFn: () => { }, errorFn: () => { } }); setAuthorizationHeader(svc, saltedToken); - const user = await svc.authService.getUserDetails(); + const user = await svc.authService.getUserDetails(false); return { user, token: saltedToken, -- 2.30.2