Stringifying Console Errors with captureConsoleIntegration #13410
Unanswered
neo-dustin-nguyen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm using captureConsoleIntegration to capture console errors. However, some errors come with objects that can't be serialized. For example, we have errors from Apollo GraphQL like Cache data may be lost when replacing the %s field of a %s object or Missing field '%s' while writing result %o user [value cannot be serialized], where %s is an actual string like "User," etc. Therefore making it harder fix since I don't know which field cause the error
I'm wondering if there's a way to stringify the error before sending it to Sentry. Currently, I don't see any option for preprocessing in captureConsoleIntegration; the only parameter available is levels. Here is the current implementation:
Beta Was this translation helpful? Give feedback.
All reactions