mirror of
https://github.com/penpot/penpot.git
synced 2025-03-27 15:11:26 -05:00
🐛 Add missing profile-id on the internal error reports
This commit is contained in:
parent
43ab19f690
commit
82d72fd388
1 changed files with 13 additions and 10 deletions
|
@ -7,6 +7,7 @@
|
||||||
(ns app.http.errors
|
(ns app.http.errors
|
||||||
"A errors handling for the http server."
|
"A errors handling for the http server."
|
||||||
(:require
|
(:require
|
||||||
|
[app.common.data :as d]
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.logging :as l]
|
[app.common.logging :as l]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
|
@ -26,16 +27,18 @@
|
||||||
|
|
||||||
(defn get-context
|
(defn get-context
|
||||||
[request]
|
[request]
|
||||||
(merge
|
(let [claims (:session-token-claims request)]
|
||||||
*context*
|
(merge
|
||||||
{:path (:path request)
|
*context*
|
||||||
:method (:method request)
|
{:path (:path request)
|
||||||
:params (:params request)
|
:method (:method request)
|
||||||
:ip-addr (parse-client-ip request)
|
:params (:params request)
|
||||||
:profile-id (:profile-id request)}
|
:ip-addr (parse-client-ip request)}
|
||||||
(let [headers (:headers request)]
|
(d/without-nils
|
||||||
{:user-agent (get headers "user-agent")
|
{:user-agent (yrq/get-header request "user-agent")
|
||||||
:frontend-version (get headers "x-frontend-version" "unknown")})))
|
:frontend-version (or (yrq/get-header request "x-frontend-version")
|
||||||
|
"unknown")
|
||||||
|
:profile-id (:uid claims)}))))
|
||||||
|
|
||||||
(defmulti handle-exception
|
(defmulti handle-exception
|
||||||
(fn [err & _rest]
|
(fn [err & _rest]
|
||||||
|
|
Loading…
Add table
Reference in a new issue