Skip to content
Snippets Groups Projects
Unverified Commit b6ad75f6 authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Merge pull request #8075 from metabase/if-sending-slack-pulse-fails-still-send-email

If sending a Slack pulse/alert fails, still send email pulse/alert
parents 2b3f5276 7b1ff963
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,7 @@
[metabase.util
[ui-logic :as ui]
[urls :as urls]]
[metabase.util.urls :as urls]
[puppetlabs.i18n.core :refer [tru]]
[puppetlabs.i18n.core :refer [trs tru]]
[schema.core :as s]
[toucan.db :as db])
(:import java.util.TimeZone
......@@ -212,7 +211,12 @@
(defn- send-notifications! [notifications]
(doseq [notification notifications]
(send-notification! notification)))
;; do a try-catch around each notification so if one fails, we'll still send the other ones for example, an Alert
;; set up to send over both Slack & email: if Slack fails, we still want to send the email (#7409)
(try
(send-notification! notification)
(catch Throwable e
(log/error e (trs "Error sending notification!"))))))
(defn- pulse->notifications [{:keys [cards channel-ids], :as pulse}]
(let [results (for [card cards
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment