From 29ad9aa0579e41f114304f953e35de00bc4abba8 Mon Sep 17 00:00:00 2001 From: Elena Torro Date: Tue, 19 May 2026 10:35:14 +0200 Subject: [PATCH] :bug: Fix redirect after leaving team --- frontend/src/app/main/data/team.cljs | 10 +++++++++- frontend/src/app/main/ui/static.cljs | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/data/team.cljs b/frontend/src/app/main/data/team.cljs index aefa6acc61..de2a0ae400 100644 --- a/frontend/src/app/main/data/team.cljs +++ b/frontend/src/app/main/data/team.cljs @@ -82,7 +82,15 @@ (watch [_ state _] (when-let [team-id (or team-id (:current-team-id state))] (->> (rp/cmd! :get-team-members {:team-id team-id}) - (rx/map (partial members-fetched team-id)))))))) + (rx/map (partial members-fetched team-id)) + (rx/catch (fn [cause] + (let [{:keys [type]} (ex-data cause)] + (if (= :not-found type) + (do + (log/warn :hint "fetch-members: team not found, skipping" + :team-id (str team-id)) + (rx/empty)) + (rx/throw cause))))))))))) (defn- invitations-fetched [team-id invitations] diff --git a/frontend/src/app/main/ui/static.cljs b/frontend/src/app/main/ui/static.cljs index 1b4b0e16b0..49dfd92f20 100644 --- a/frontend/src/app/main/ui/static.cljs +++ b/frontend/src/app/main/ui/static.cljs @@ -229,7 +229,8 @@ (mf/deps profile) (fn [] (let [team-id (:default-team-id profile)] - (st/emit! (dcm/go-to-dashboard-recent :team-id team-id))))) + (st/emit! (rt/assign-exception nil) + (dcm/go-to-dashboard-recent :team-id team-id))))) on-success (mf/use-fn