mirror of
https://github.com/penpot/penpot.git
synced 2025-06-26 01:26:59 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
5f81c7bc2d
13 changed files with 178 additions and 72 deletions
|
@ -61,8 +61,15 @@
|
|||
|
||||
(defmethod handle-exception :validation
|
||||
[err _]
|
||||
(let [edata (ex-data err)]
|
||||
{:status 400 :body (dissoc edata ::s/problems ::s/value)}))
|
||||
(let [data (ex-data err)
|
||||
explain (binding [s/*explain-out* expound/printer]
|
||||
(with-out-str
|
||||
(s/explain-out (update data ::s/problems #(take 10 %)))))]
|
||||
{:status 400
|
||||
:body (-> data
|
||||
(dissoc ::s/problems)
|
||||
(dissoc ::s/value)
|
||||
(assoc :explain explain))}))
|
||||
|
||||
(defmethod handle-exception :assertion
|
||||
[error request]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue