mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
✨ Minor improvement on telemetry server error reporting.
This commit is contained in:
parent
4d5231598f
commit
81bf68c67c
3 changed files with 9 additions and 3 deletions
|
@ -57,7 +57,6 @@
|
|||
:registration-domain-whitelist ""
|
||||
|
||||
:telemetry-enabled false
|
||||
:telemetry-with-taiga true
|
||||
:telemetry-uri "https://telemetry.penpot.app/"
|
||||
|
||||
;; LDAP auth disabled by default. Set ldap-auth-host to enable
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
:uri (:uri cfg)
|
||||
:headers {"content-type" "application/json"}
|
||||
:body (json/encode-str data)})]
|
||||
|
||||
(when (not= 200 (:status response))
|
||||
(ex/raise :type :internal
|
||||
:code :invalid-response-from-google
|
||||
|
@ -129,7 +130,7 @@
|
|||
[{:keys [conn version]}]
|
||||
(merge
|
||||
{:version version
|
||||
:with-taiga (:telemetry-with-taiga cfg/config)
|
||||
:with-taiga (:telemetry-with-taiga cfg/config false)
|
||||
:total-teams (retrieve-num-teams conn)
|
||||
:total-projects (retrieve-num-projects conn)
|
||||
:total-files (retrieve-num-files conn)}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
[app.common.spec :as us]
|
||||
[app.db :as db]
|
||||
[app.http.middleware :refer [wrap-parse-request-body]]
|
||||
[clojure.pprint :refer [pprint]]
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.tools.logging :as log]
|
||||
[integrant.core :as ig]
|
||||
|
@ -87,7 +88,12 @@
|
|||
(catch Exception e
|
||||
;; We don't want notify user of a error, just log it for posible
|
||||
;; future investigation.
|
||||
(log/warnf e "Unexpected error on telemetry.")))
|
||||
(log/warn e (str "Unexpected error on telemetry:\n"
|
||||
(when-let [edata (ex-data e)]
|
||||
(str "ex-data: \n"
|
||||
(with-out-str (pprint edata))))
|
||||
(str "params: \n"
|
||||
(with-out-str (pprint params)))))))
|
||||
{:status 200
|
||||
:body "OK\n"})
|
||||
|
||||
|
|
Loading…
Reference in a new issue