mirror of
https://github.com/penpot/penpot.git
synced 2025-06-08 08:51:37 +02:00
✨ Improve error reporting
This commit is contained in:
parent
701a98fab6
commit
ca02999ae9
3 changed files with 54 additions and 7 deletions
|
@ -59,7 +59,9 @@
|
|||
(-> (method data)
|
||||
(p/then handle-response)
|
||||
(p/then respond)
|
||||
(p/catch raise)))))
|
||||
(p/catch (fn [cause]
|
||||
(let [context {:profile-id profile-id}]
|
||||
(raise (ex/wrap-with-context cause context)))))))))
|
||||
|
||||
(defn- rpc-mutation-handler
|
||||
"Ring handler that dispatches mutation requests and convert between
|
||||
|
@ -81,7 +83,9 @@
|
|||
(-> (method data)
|
||||
(p/then handle-response)
|
||||
(p/then respond)
|
||||
(p/catch raise)))))
|
||||
(p/catch (fn [cause]
|
||||
(let [context {:profile-id profile-id}]
|
||||
(raise (ex/wrap-with-context cause context)))))))))
|
||||
|
||||
(defn- wrap-metrics
|
||||
"Wrap service method with metrics measurement."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue