mirror of
https://github.com/penpot/penpot.git
synced 2025-02-12 18:18:24 -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"}
|
||||
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"}
|
||||
metosin/reitit-ring {:mvn/version "0.5.10"}
|
||||
metosin/jsonista {:mvn/version "0.3.0"}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
(ns app.http
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.spec :as us]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cfg]
|
||||
|
@ -104,11 +105,16 @@
|
|||
(try
|
||||
(handler request)
|
||||
(catch Exception e
|
||||
(let [cdata (errors/get-error-context request e)]
|
||||
(errors/update-thread-context! cdata)
|
||||
(log/errorf e "Unhandled exception: %s (id: %s)" (ex-message e) (str (:id cdata)))
|
||||
{:status 500
|
||||
:body "internal server error"}))))))
|
||||
(try
|
||||
(let [cdata (errors/get-error-context request e)]
|
||||
(errors/update-thread-context! cdata)
|
||||
(log/errorf e "Unhandled exception: %s (id: %s)" (ex-message e) (str (:id cdata)))
|
||||
{:status 500
|
||||
: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
|
||||
[{: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