From ee30d51c46ff13820745f1f6ca7a08acc0c8ce1b Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Fri, 6 Feb 2026 14:57:35 +0800 Subject: [PATCH] fix: show user doesn't exist error when inviting wrong email --- src/main/frontend/handler/db_based/sync.cljs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/frontend/handler/db_based/sync.cljs b/src/main/frontend/handler/db_based/sync.cljs index 783e77ce32..f82924bf37 100644 --- a/src/main/frontend/handler/db_based/sync.cljs +++ b/src/main/frontend/handler/db_based/sync.cljs @@ -377,11 +377,14 @@ repo graph-uuid email))] (notification/show! "Invitation sent!" :success)) (p/catch (fn [e] - (notification/show! "Something wrong, please try again." :error) - (log/error :db-sync/invite-email-failed - {:error e - :graph-uuid graph-uuid - :email email})))) + (if (= "user not found" (get-in (ex-data e) [:body :error])) + (notification/show! "User doesn't exist yet." :warning) + (do + (notification/show! "Something wrong, please try again." :error) + (log/error :db-sync/invite-email-failed + {:error e + :graph-uuid graph-uuid + :email email})))))) (p/rejected (ex-info "db-sync missing invite info" {:type :db-sync/invalid-invite :graph-uuid graph-uuid