mirror of
https://github.com/logseq/logseq.git
synced 2026-05-26 21:54:26 +00:00
fix: show user doesn't exist error when inviting wrong email
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user