From eb1569287b6cff64378e5f793392db0084d14990 Mon Sep 17 00:00:00 2001 From: Christian Weilbach Date: Sat, 13 Apr 2024 07:04:17 +0000 Subject: [PATCH] Improve error handling. --- src/ie/simm/runtimes/telegram.clj | 9 ++++++--- src/ie/simm/simmie.clj | 5 ++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ie/simm/runtimes/telegram.clj b/src/ie/simm/runtimes/telegram.clj index 36adf83..c9ff806 100644 --- a/src/ie/simm/runtimes/telegram.clj +++ b/src/ie/simm/runtimes/telegram.clj @@ -111,7 +111,10 @@ (put? S next-in (assoc m :type :ie.simm.languages.chat/send-text-reply :response (try (t/send-text (:telegram-bot-token config) chat-id msg) - (catch Exception e + ;; TODO bug in slingshot forces us to catch Throwable for HTTP errors, + ;; https://github.com/scgilardi/slingshot/issues/60 + ;; this can also be resolved by refactoring morse to be more lean + (catch Throwable e (debug "error sending telegram message:" e) e)))) (recur (