🐛 Ignore posthog exceptions in unhandled exception handler (#8629)

PostHog recorder throws errors like 'Cannot assign to read only property
'assert' of object' which are unrelated to the application and should be
ignored to prevent noise in error reporting.
This commit is contained in:
Andrey Antukh
2026-03-17 18:41:06 +01:00
committed by GitHub
parent c6f8356847
commit 1a59017e1c

View File

@@ -337,9 +337,15 @@
(or (str/includes? stack "chrome-extension://")
(str/includes? stack "moz-extension://")))))
(from-posthog? [cause]
(let [stack (.-stack cause)]
(and (string? stack)
(str/includes? stack "posthog"))))
(is-ignorable-exception? [cause]
(let [message (ex-message cause)]
(or (from-extension? cause)
(from-posthog? cause)
(= message "Possible side-effect in debug-evaluate")
(= message "Unexpected end of input")
(str/starts-with? message "invalid props on component")