mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 00:49:02 +02:00
✨ Improve error response formatting
This commit is contained in:
parent
1318019ccb
commit
782d733bc9
3 changed files with 25 additions and 25 deletions
|
@ -288,7 +288,8 @@
|
|||
|
||||
(when (ex/exception? cause)
|
||||
(let [data (ex-data cause)
|
||||
explain (ex/explain data)]
|
||||
explain (or (:explain data)
|
||||
(ex/explain data))]
|
||||
(when explain
|
||||
(js/console.log "Explain:")
|
||||
(js/console.log explain))
|
||||
|
|
|
@ -197,8 +197,6 @@
|
|||
[{:keys [schema errors value]} & {:keys [length level]}]
|
||||
(let [errors (mapv #(update % :schema form) errors)]
|
||||
(with-out-str
|
||||
(println "Schema: ")
|
||||
(println (pp/pprint-str (form schema) {:width 100 :level 15 :length 20}))
|
||||
(println "Errors:")
|
||||
(println (pp/pprint-str errors {:width 100 :level 15 :length 20}))
|
||||
(println "Value:")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue