mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
🐛 Properly handle missing log/error id on database logger.
This commit is contained in:
parent
224aa5b89a
commit
914b41fcd4
1 changed files with 6 additions and 3 deletions
|
@ -54,14 +54,17 @@
|
|||
(assoc :tenant (cf/get :tenant))
|
||||
(assoc :host (cf/get :host))
|
||||
(assoc :public-uri (cf/get :public-uri))
|
||||
(assoc :version (:full cf/version))))
|
||||
(assoc :version (:full cf/version))
|
||||
(update :id (fn [id] (or id (uuid/next))))))
|
||||
|
||||
(defn handle-event
|
||||
[{:keys [executor] :as cfg} event]
|
||||
(aa/with-thread executor
|
||||
(try
|
||||
(let [event (parse-event event)]
|
||||
(l/debug :hint "registering error on database" :id (:id event))
|
||||
(let [event (parse-event event)
|
||||
uri (cf/get :public-uri)]
|
||||
(l/debug :hint "registering error on database" :id (:id event)
|
||||
:uri (str uri "/dbg/error-by-id/" (:id event)))
|
||||
(persist-on-database! cfg event))
|
||||
(catch Exception e
|
||||
(l/warn :hint "unexpected exception on database error logger"
|
||||
|
|
Loading…
Add table
Reference in a new issue