Javascript - 忽略哨兵中的特定错误

时间:2021-04-30 07:37:59

标签: javascript sentry

我想忽略以下错误(我是从 Sentry 复制过来的)。

TypeError HTMLElement.handleUnpreparedAnnotatable(app-sidebar/app-sidebar-core)

Cannot read property 'parentNode' of null

我可以使用以下内容,但它不起作用

ignoreErrors: [
        /HTMLElement.handleUnpreparedAnnotatable\(app-sidebar\/app-sidebar-core\)/,
              ],

我不能使用错误消息 (Cannot read property 'parentNode' of null),因为它不是唯一的。还有其他错误具有相同的消息。

忽略错误

https://github.com/getsentry/sentry-javascript/blob/ab7ba810a97a2acae3dbd2c82b07e3972147bb97/packages/browser/examples/app.js#L38

0 个答案:

没有答案