From 84bee9fb93e0c20298094ff4fee3d41af15da6a4 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 16 Dec 2022 09:27:00 +0100 Subject: [PATCH] :bug: Fix minor issue on logging when cause is nil --- common/src/app/common/logging.cljc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/app/common/logging.cljc b/common/src/app/common/logging.cljc index 89ad318e7f..0796daa4b6 100644 --- a/common/src/app/common/logging.cljc +++ b/common/src/app/common/logging.cljc @@ -44,8 +44,9 @@ (defn build-message-cause [props] #?(:clj (when-let [[_ cause] (d/seek (fn [[k]] (= k :cause)) props)] - (with-out-str - (ex/print-throwable cause))) + (when cause + (with-out-str + (ex/print-throwable cause)))) :cljs nil)) (defn build-message