0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-16 01:31:22 -05:00

Improve error stack trace reporting.

This commit is contained in:
Andrey Antukh 2019-12-11 12:14:15 +01:00
parent 433d8cee9a
commit 449ca770c1

View file

@ -48,10 +48,13 @@
(defmethod handle-exception :default
[err req]
(log/error err "Unhandled exception on request:" (:path req))
(log/error "Unhandled exception on request:" (:path req) "\n"
(with-out-str
(.printStackTrace err (java.io.PrintWriter. *out*))))
{:status 500
:body {:type :exception
:message (ex-message err)}})
:message (ex-message err)
:data (ex-data err)}})
(defn handle
[error req]