From a327ed2461dce14e41729c61c91332e0d35accf2 Mon Sep 17 00:00:00 2001 From: Michael Nelson Date: Tue, 14 Mar 2023 17:05:02 +1100 Subject: [PATCH] YASSS, after too much debugging, found the error was not being converted according to the new format. Signed-off-by: Michael Nelson --- dashboard/src/shared/utils.ts | 2 +- integration/tests/utils/kubeapps-login.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dashboard/src/shared/utils.ts b/dashboard/src/shared/utils.ts index 91cae0de819..793ff0ac9ef 100644 --- a/dashboard/src/shared/utils.ts +++ b/dashboard/src/shared/utils.ts @@ -353,7 +353,7 @@ export function getGlobalNamespaceOrNamespace( // See https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto // See https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go export function convertGrpcAuthError(e: any): CustomError | any { - const msg = e?.metadata?.headersMap?.["grpc-message"].toString(); + const msg = (e?.metadata?.get("grpc-message") || "").toString(); switch (e?.code) { case Code.Unauthenticated: return new UnauthorizedNetworkError(msg); diff --git a/integration/tests/utils/kubeapps-login.js b/integration/tests/utils/kubeapps-login.js index 1a8dc39b0c2..abcad05e6ff 100644 --- a/integration/tests/utils/kubeapps-login.js +++ b/integration/tests/utils/kubeapps-login.js @@ -42,7 +42,6 @@ exports.KubeappsLogin = class KubeappsLogin { console.log("Logging out of Kubeapps"); await this.page.click(".dropdown.kubeapps-menu .kubeapps-nav-link"); await this.page.click('cds-button:has-text("Log out")'); - await this.page.waitForLoadState("networkidle"); console.log("Logged out of Kubeapps"); }