Push new entries in ignoreErrors array dynamically after initial API calls #6706
-
We are using @sentry/nextjs in our product. There are some initial APIs that bring some global configs. We need to filter certain types of errors based on these configs. Currently we are using beforeSend to filter out errors. Wanted to know if we can add these directly to ignoreErrors property after Sentry.init() has been called. This would avoid running logic part inside beforeSend function
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @Aman18493 - |
Beta Was this translation helpful? Give feedback.
Hey @Aman18493 -
ignoreErrors
, and the rest of the options passed intoSentry.init
are meant to be immutable - we don't expose a way to mutate them after the fact at the moment. As a result, usingbeforeSend
is your best bet here.