mirror of
https://github.com/penpot/penpot.git
synced 2025-02-14 11:09:04 -05:00
✨ Minor improvements on error reporter.
This commit is contained in:
parent
5518f561f0
commit
0bbc006b98
4 changed files with 16 additions and 5 deletions
|
@ -58,9 +58,15 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<div class="table-row">
|
<div class="table-row">
|
||||||
<div class="table-key">ERID: </div>
|
<div class="table-key" title="Error ID">ERID: </div>
|
||||||
<div class="table-val">{{id}}</div>
|
<div class="table-val">{{id}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if profile-id %}
|
||||||
|
<div class="table-row">
|
||||||
|
<div class="table-key" title="Profile ID">PFID: </div>
|
||||||
|
<div class="table-val">{{profile-id}}</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="table-row">
|
<div class="table-row">
|
||||||
<div class="table-key">VERS: </div>
|
<div class="table-key">VERS: </div>
|
||||||
<div class="table-val">{{version}}</div>
|
<div class="table-val">{{version}}</div>
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
[app.util.json :as json]
|
[app.util.json :as json]
|
||||||
[app.util.http :as http]
|
[app.util.http :as http]
|
||||||
[app.util.template :as tmpl]
|
[app.util.template :as tmpl]
|
||||||
[clojure.pprint :refer [pprint]]
|
|
||||||
[clojure.core.async :as a]
|
[clojure.core.async :as a]
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
[clojure.tools.logging :as log]
|
[clojure.tools.logging :as log]
|
||||||
|
@ -74,7 +73,8 @@
|
||||||
[event]
|
[event]
|
||||||
(let [^LogEvent levent (deref event)
|
(let [^LogEvent levent (deref event)
|
||||||
^ReadOnlyStringMap rosm (.getContextData levent)]
|
^ReadOnlyStringMap rosm (.getContextData levent)]
|
||||||
(into {:message (str event)}
|
(into {:message (str event)
|
||||||
|
:id (uuid/next)} ; set default uuid for cases when it not comes.
|
||||||
(comp
|
(comp
|
||||||
(map (fn [[key val]]
|
(map (fn [[key val]]
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
(ThreadContext/put
|
(ThreadContext/put
|
||||||
(name key)
|
(name key)
|
||||||
(cond
|
(cond
|
||||||
(coll? val) (with-out-str (pprint val))
|
(coll? val)
|
||||||
|
(binding [clojure.pprint/*print-right-margin* 120]
|
||||||
|
(with-out-str (pprint val)))
|
||||||
(instance? clojure.lang.Named val) (name val)
|
(instance? clojure.lang.Named val) (name val)
|
||||||
:else (str val))))
|
:else (str val))))
|
||||||
data))
|
data))
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
[integrant.core :as ig]
|
[integrant.core :as ig]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
|
[app.http.errors :refer [update-thread-context!]]
|
||||||
[buddy.core.codecs :as bc]
|
[buddy.core.codecs :as bc]
|
||||||
[buddy.core.nonce :as bn]))
|
[buddy.core.nonce :as bn]))
|
||||||
|
|
||||||
|
@ -55,7 +56,9 @@
|
||||||
[cfg handler]
|
[cfg handler]
|
||||||
(fn [request]
|
(fn [request]
|
||||||
(if-let [profile-id (retrieve-from-request cfg request)]
|
(if-let [profile-id (retrieve-from-request cfg request)]
|
||||||
(handler (assoc request :profile-id profile-id))
|
(do
|
||||||
|
(update-thread-context! {:profile-id profile-id})
|
||||||
|
(handler (assoc request :profile-id profile-id)))
|
||||||
(handler request))))
|
(handler request))))
|
||||||
|
|
||||||
(defmethod ig/pre-init-spec ::session [_]
|
(defmethod ig/pre-init-spec ::session [_]
|
||||||
|
|
Loading…
Add table
Reference in a new issue