mirror of
https://github.com/penpot/penpot.git
synced 2025-05-20 17:36:11 +02:00
✨ Improve backend and worker error handling
This commit is contained in:
parent
c026d05bc3
commit
701a98fab6
7 changed files with 112 additions and 47 deletions
|
@ -54,9 +54,11 @@
|
|||
|
||||
(reply-error [cause]
|
||||
(if (map? cause)
|
||||
(post {:error cause})
|
||||
(post {:error {:type :unexpected
|
||||
:code :unhandled-error-on-worker
|
||||
(post {:error {:type :worker-error
|
||||
:code (or (:type cause) :wrapped)
|
||||
:data cause}})
|
||||
(post {:error {:type :worker-error
|
||||
:code :unhandled-error
|
||||
:hint (ex-message cause)
|
||||
:data (ex-data cause)}})))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue