mirror of
https://github.com/penpot/penpot.git
synced 2026-08-07 05:18:36 +00:00
✨ Fix minor issues on error reporting.
This commit is contained in:
parent
b6f460940f
commit
bda97adf4f
@ -77,7 +77,9 @@
|
|||||||
(handler request)
|
(handler request)
|
||||||
(catch Throwable e
|
(catch Throwable e
|
||||||
(l/with-context (errors/get-error-context request e)
|
(l/with-context (errors/get-error-context request e)
|
||||||
(l/error :hint (ex-message e) :cause e)
|
(l/error :hint "unexpected error processing request"
|
||||||
|
:query-string (:query-string request)
|
||||||
|
:cause e)
|
||||||
{:status 500 :body "internal server error"}))))))
|
{:status 500 :body "internal server error"}))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
@ -150,7 +150,7 @@
|
|||||||
(binding [ppr/*print-right-margin* 300]
|
(binding [ppr/*print-right-margin* 300]
|
||||||
(let [context (dissoc report
|
(let [context (dissoc report
|
||||||
:trace :cause :params :data :spec-problems
|
:trace :cause :params :data :spec-problems
|
||||||
:spec-value :error :explain :hint :message)
|
:spec-value :error :explain :hint)
|
||||||
params {:context (with-out-str (ppr/pprint context))
|
params {:context (with-out-str (ppr/pprint context))
|
||||||
:hint (:hint report)
|
:hint (:hint report)
|
||||||
:spec-problems (:spec-problems report)
|
:spec-problems (:spec-problems report)
|
||||||
|
|||||||
@ -34,7 +34,6 @@
|
|||||||
:data (some-> data (dissoc ::s/problems ::s/value :hint))
|
:data (some-> data (dissoc ::s/problems ::s/value :hint))
|
||||||
:ip-addr (parse-client-ip request)
|
:ip-addr (parse-client-ip request)
|
||||||
:profile-id (:profile-id request)}
|
:profile-id (:profile-id request)}
|
||||||
|
|
||||||
(let [headers (:headers request)]
|
(let [headers (:headers request)]
|
||||||
{:user-agent (get headers "user-agent")
|
{:user-agent (get headers "user-agent")
|
||||||
:frontend-version (get headers "x-frontend-version" "unknown")}))))
|
:frontend-version (get headers "x-frontend-version" "unknown")}))))
|
||||||
|
|||||||
@ -70,6 +70,7 @@
|
|||||||
(let [body (:body response)
|
(let [body (:body response)
|
||||||
params (:query-params request)
|
params (:query-params request)
|
||||||
opts {:type (if (contains? params "transit_verbose") :json-verbose :json)}]
|
opts {:type (if (contains? params "transit_verbose") :json-verbose :json)}]
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
(:ws response)
|
(:ws response)
|
||||||
response
|
response
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user