From ea03477e8ebd06974f414fb798f556e4e55e3eec Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 26 Jan 2021 17:14:54 +0100 Subject: [PATCH] :sparkles: Replace Error with Throwable (revert prev commit). This reverts commit d218d70b8dc2fd2ecfc7e6146d32c101d3a6200e. --- backend/src/app/http.clj | 4 ++-- backend/src/app/http/middleware.clj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/app/http.clj b/backend/src/app/http.clj index cf5f124b8..2c31da214 100644 --- a/backend/src/app/http.clj +++ b/backend/src/app/http.clj @@ -104,14 +104,14 @@ (fn [request] (try (handler request) - (catch Error e + (catch Throwable e (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 Error e + (catch Throwable e (log/errorf e "Unhandled exception: %s" (ex-message e)) {:status 500 :body "internal server error"}))))))) diff --git a/backend/src/app/http/middleware.clj b/backend/src/app/http/middleware.clj index c14d83c9a..a77716f4d 100644 --- a/backend/src/app/http/middleware.clj +++ b/backend/src/app/http/middleware.clj @@ -111,7 +111,7 @@ (fn [request] (try (handler request) - (catch Error e + (catch Throwable e (on-error e request))))) (def errors