Skip to content

Commit

Permalink
Don't serialize exception objects for Sentry
Browse files Browse the repository at this point in the history
We already have the exception stack and details from raven, and the
exception in ex-info will cause cheshire to throw, so we remove it.
  • Loading branch information
tobias committed Mar 22, 2024
1 parent d5bac31 commit 8160f63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/clojars/errors.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
(defn raven-extra-data [e extra]
(-> (ex-data e)
(merge extra)
(dissoc :message)))
(dissoc :message)
;; Errors thrown by Cognitect's AWS client include the root exception in
;; the ex-data, which we can't serialize to Sentry, so we strip it out
;; here.
(dissoc :cognitect.http-client/throwable)))

(defn raven-event-info [id message e extra]
(cond-> {}
Expand Down

0 comments on commit 8160f63

Please sign in to comment.