From 449ca770c1e3bd356038ed48bab8f1471c58e4aa Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 11 Dec 2019 12:14:15 +0100 Subject: [PATCH] :sparkles: Improve error stack trace reporting. --- backend/src/uxbox/http/errors.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/uxbox/http/errors.clj b/backend/src/uxbox/http/errors.clj index 0863e1ae1..4ac6b86c4 100644 --- a/backend/src/uxbox/http/errors.clj +++ b/backend/src/uxbox/http/errors.clj @@ -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]