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) {