mirror of
https://github.com/penpot/penpot.git
synced 2025-02-15 03:28:25 -05:00
✨ Minor improvements on error reporting.
This commit is contained in:
parent
7759418f5d
commit
c0fb108e06
2 changed files with 12 additions and 6 deletions
|
@ -33,7 +33,7 @@
|
||||||
io.lettuce/lettuce-core {:mvn/version "5.2.2.RELEASE"}
|
io.lettuce/lettuce-core {:mvn/version "5.2.2.RELEASE"}
|
||||||
java-http-clj/java-http-clj {:mvn/version "0.4.1"}
|
java-http-clj/java-http-clj {:mvn/version "0.4.1"}
|
||||||
|
|
||||||
info.sunng/ring-jetty9-adapter {:mvn/version "0.14.1"}
|
info.sunng/ring-jetty9-adapter {:mvn/version "0.14.2"}
|
||||||
seancorfield/next.jdbc {:mvn/version "1.1.613"}
|
seancorfield/next.jdbc {:mvn/version "1.1.613"}
|
||||||
metosin/reitit-ring {:mvn/version "0.5.10"}
|
metosin/reitit-ring {:mvn/version "0.5.10"}
|
||||||
metosin/jsonista {:mvn/version "0.3.0"}
|
metosin/jsonista {:mvn/version "0.3.0"}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
(ns app.http
|
(ns app.http
|
||||||
(:require
|
(:require
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
|
[app.common.exceptions :as ex]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.config :as cfg]
|
[app.config :as cfg]
|
||||||
|
@ -104,11 +105,16 @@
|
||||||
(try
|
(try
|
||||||
(handler request)
|
(handler request)
|
||||||
(catch Exception e
|
(catch Exception e
|
||||||
|
(try
|
||||||
(let [cdata (errors/get-error-context request e)]
|
(let [cdata (errors/get-error-context request e)]
|
||||||
(errors/update-thread-context! cdata)
|
(errors/update-thread-context! cdata)
|
||||||
(log/errorf e "Unhandled exception: %s (id: %s)" (ex-message e) (str (:id cdata)))
|
(log/errorf e "Unhandled exception: %s (id: %s)" (ex-message e) (str (:id cdata)))
|
||||||
{:status 500
|
{:status 500
|
||||||
:body "internal server error"}))))))
|
:body "internal server error"})
|
||||||
|
(catch Exception e
|
||||||
|
(log/errorf e "Unhandled exception: %s" (ex-message e))
|
||||||
|
{:status 500
|
||||||
|
:body "internal server error"})))))))
|
||||||
|
|
||||||
(defn- create-router
|
(defn- create-router
|
||||||
[{:keys [session rpc google-auth gitlab-auth github-auth metrics ldap-auth storage svgparse assets] :as cfg}]
|
[{:keys [session rpc google-auth gitlab-auth github-auth metrics ldap-auth storage svgparse assets] :as cfg}]
|
||||||
|
|
Loading…
Add table
Reference in a new issue