fix: catch capture errors

pull/2810/head
Tienson Qin 2021-09-13 11:50:37 +08:00
parent b05e53d371
commit 77eea65310
1 changed files with 5 additions and 1 deletions

View File

@ -39,7 +39,11 @@
(posthog/opt_in_capturing))))
(defn capture [id data]
(posthog/capture (str id) (bean/->js data)))
(try
(posthog/capture (str id) (bean/->js data))
(catch js/Error _e
;; opt out or network issues
nil)))
(comment
(posthog/debug))