mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 06:46:39 +02:00
🐛 Fix incorrect erorr reporting.
This commit is contained in:
parent
8f37f74d29
commit
01edf49de0
4 changed files with 24 additions and 8 deletions
|
@ -186,10 +186,16 @@
|
|||
[spec data]
|
||||
(let [result (s/conform spec data)]
|
||||
(when (= result ::s/invalid)
|
||||
(let [edata (s/explain-data spec data)]
|
||||
(let [edata (s/explain-data spec data)
|
||||
nhint (with-out-str
|
||||
(s/explain-out edata))
|
||||
vhint (with-out-str
|
||||
(expound/printer edata))]
|
||||
(throw (ex/error :type :validation
|
||||
:code :spec-validation
|
||||
:data data))))
|
||||
:data data
|
||||
:hint nhint
|
||||
:hint-verbose vhint))))
|
||||
result))
|
||||
|
||||
(defmacro instrument!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue