From 73a205fd29ed83c80eb3acbc19955cc1f7ce3e1f Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Wed, 4 Oct 2023 12:31:06 -0400 Subject: [PATCH] Catch logout errors --- src/context/auth.tsx | 12 ++++++++---- src/gql/generated/types.ts | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/context/auth.tsx b/src/context/auth.tsx index 13f4fb4116..8d704d3637 100644 --- a/src/context/auth.tsx +++ b/src/context/auth.tsx @@ -60,10 +60,14 @@ const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ credentials: "include", method: "GET", redirect: "manual", - }).then(() => { - dispatch({ type: "deauthenticated" }); - window.location.href = `${getLoginDomain()}/login`; - }); + }) + .then(() => { + dispatch({ type: "deauthenticated" }); + window.location.href = `${getLoginDomain()}/login`; + }) + .catch((error) => { + leaveBreadcrumb("Logout failed", { error }, "user"); + }); }, dispatchAuthenticated: () => { if (!state.isAuthenticated) { diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index ee8713b798..0ecf455a77 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -648,7 +648,9 @@ export type GroupedBuildVariant = { export type GroupedFiles = { __typename?: "GroupedFiles"; + execution: Scalars["Int"]["output"]; files?: Maybe>; + taskId: Scalars["String"]["output"]; taskName?: Maybe; };