From 3d6f69173b91f341b2211b8aa96c8d22c8763dd7 Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 18 May 2023 13:19:01 -0700 Subject: [PATCH] Make error useful --- src/tattler/core.clj | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tattler/core.clj b/src/tattler/core.clj index ffcfb63..4259bd9 100644 --- a/src/tattler/core.clj +++ b/src/tattler/core.clj @@ -3,12 +3,16 @@ [milquetoast.client :as mqtt] [clojure.core.async :refer [go-loop note :urgency (keyword)) }) - (log/error! logger (format "rejecting invalid notification: %s" - (humanize (t/explain Notification note))))) + (let [err (humanize (t/explain Notification note))] + (log/error! logger (format "rejecting invalid notification: %s (%s)\n%s" + (:summary err) (:body err) + (pprint-to-string note))))) (recur (