0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-15 11:38:24 -05:00

🐛 Fix error handling on recovery request page

This commit is contained in:
Andrey Antukh 2024-03-06 09:16:45 +01:00
parent 1bc4001e70
commit 8cb550120a

View file

@ -49,8 +49,9 @@
on-error on-error
(mf/use-callback (mf/use-callback
(fn [data {:keys [code] :as error}] (fn [data cause]
(reset! submitted false) (reset! submitted false)
(let [code (-> cause ex-data :code)]
(case code (case code
:profile-not-verified :profile-not-verified
(rx/of (msg/error (tr "auth.notifications.profile-not-verified"))) (rx/of (msg/error (tr "auth.notifications.profile-not-verified")))
@ -61,7 +62,7 @@
:email-has-permanent-bounces :email-has-permanent-bounces
(rx/of (msg/error (tr "errors.email-has-permanent-bounces" (:email data)))) (rx/of (msg/error (tr "errors.email-has-permanent-bounces" (:email data))))
(rx/throw error)))) (rx/throw cause)))))
on-submit on-submit
(mf/use-callback (mf/use-callback