mirror of
https://github.com/penpot/penpot.git
synced 2025-07-15 16:05:17 +02: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 :tenant (cf/get :tenant))
|
||||||
(assoc :host (cf/get :host))
|
(assoc :host (cf/get :host))
|
||||||
(assoc :public-uri (cf/get :public-uri))
|
(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
|
(defn handle-event
|
||||||
[{:keys [executor] :as cfg} event]
|
[{:keys [executor] :as cfg} event]
|
||||||
(aa/with-thread executor
|
(aa/with-thread executor
|
||||||
(try
|
(try
|
||||||
(let [event (parse-event event)]
|
(let [event (parse-event event)
|
||||||
(l/debug :hint "registering error on database" :id (:id 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))
|
(persist-on-database! cfg event))
|
||||||
(catch Exception e
|
(catch Exception e
|
||||||
(l/warn :hint "unexpected exception on database error logger"
|
(l/warn :hint "unexpected exception on database error logger"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue