From: Peter Amstutz Date: Fri, 2 Oct 2020 19:53:34 +0000 (-0400) Subject: 16947: Don't show misleading session validate errors. X-Git-Tag: 2.1.0~4^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/c666d78642ac6af933bfee6bca45b0815a2ed86e 16947: Don't show misleading session validate errors. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- 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,