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 |
Answered by
AbhiPrasad
Jan 11, 2023
Replies: 1 comment
|
Hey @Aman18493 - |
0 replies
Answer selected by
smeubank
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Aman18493 -
ignoreErrors, and the rest of the options passed intoSentry.initare meant to be immutable - we don't expose a way to mutate them after the fact at the moment. As a result, usingbeforeSendis your best bet here.