Skip to content
Snippets Groups Projects
Unverified Commit 60c7c693 authored by Noah Moss's avatar Noah Moss Committed by GitHub
Browse files

cleanup Slack error logging (#25902)

parent 1c51ef5a
Branches jest-role-hidden
No related tags found
No related merge requests found
......@@ -91,9 +91,8 @@
;; being used)
(when (slack-token-valid?) (messages/send-slack-token-error-emails!))
(slack-token-valid?! false))
(if invalid-token?
(log/warn (u/pprint-to-str 'red (trs "🔒 Your Slack authorization token is invalid or has been revoked. Please update your integration in Admin Settings -> Slack.")))
(log/warn (u/pprint-to-str 'red error)))
(when invalid-token?
(log/warn (u/pprint-to-str 'red (trs "🔒 Your Slack authorization token is invalid or has been revoked. Please update your integration in Admin Settings -> Slack."))))
(throw (ex-info message error))))
(defn- handle-response [{:keys [status body]}]
......@@ -122,7 +121,7 @@
(try
(handle-response (request-fn url request))
(catch Throwable e
(throw (ex-info (.getMessage e) (merge (ex-data e) {:url url, :request request}) e))))))))
(throw (ex-info (.getMessage e) (merge (ex-data e) {:url url}) e))))))))
(defn- GET
"Make a GET request to the Slack API."
......
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