'How to stop error propagating from widget to the upper app's Sentry instance

I have a widget as a web component and want to use Sentry in it (via @sentry/react), but apps the widget is embedded in usually have their own Sentry instance, so I get errors twice in two different projects.

In widget I did it with hub like this.

Is there a way to stop error propagation to the upper app?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source