Skip to content

Commit

Permalink
Merge pull request #13 from 2hire/revert-12-split-slack-attachments
Browse files Browse the repository at this point in the history
Revert "fix: Added logs with serialized attachments"
  • Loading branch information
AGreenPlace authored Oct 10, 2023
2 parents 5ffdd84 + 7614928 commit 0baac59
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/metabase/pulse.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(ns metabase.pulse
"Public API for sending Pulses."
(:require
[clojure.data.json :as json]
[clojure.string :as str]
[metabase.api.common :as api]
[metabase.config :as config]
Expand Down Expand Up @@ -532,13 +531,11 @@
[{:keys [channel-id message attachments]}]
(let [attachments (create-and-upload-slack-attachments! attachments)]
(try
(log/error "TestNonLoop" (trs "Sending Slack message with {0} attachments: {1}" (count attachments) (json/generate-string attachments)))
(log/error "TestNonLoop" (trs "Sending Slack message with {0} attachments" (count attachments)))
(slack/post-chat-message! channel-id message attachments)
(catch ExceptionInfo e
;; Token errors have already been logged and we should not retry.
(when-not (contains? (:errors (ex-data e)) :slack-token)
;; Logging errors here for debug
(log/error e (trs "Error sending Slack message with {0} attachments" (count attachments)))
(throw e))))))

(defmethod send-notification! :email
Expand Down

0 comments on commit 0baac59

Please sign in to comment.