mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 20:46:37 +02:00
🐛 Fix incorrect erorr reporting.
This commit is contained in:
parent
8f37f74d29
commit
01edf49de0
4 changed files with 24 additions and 8 deletions
|
@ -209,6 +209,18 @@
|
|||
;; --- Error Handling
|
||||
|
||||
(defmethod ptk/handle-error :validation
|
||||
[error]
|
||||
(ts/schedule
|
||||
(st/emitf (dm/show {:content "Unexpected validation error (server side)."
|
||||
:type :error
|
||||
:timeout 5000})))
|
||||
(when-let [explain (:hint-verbose error)]
|
||||
(js/console.group "Server Error")
|
||||
(js/console.error (if (map? error) (pr-str error) error))
|
||||
(js/console.error explain)
|
||||
(js/console.endGroup "Server Error")))
|
||||
|
||||
(defmethod ptk/handle-error :spec-validation
|
||||
[error]
|
||||
(ts/schedule
|
||||
(st/emitf (dm/show {:content "Unexpected validation error (server side)."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue