Sentry-javascript: Avoid logging *handled='yes'* exceptions

Created on 9 Mar 2020  路  5Comments  路  Source: getsentry/sentry-javascript

Hi devs.

I wanna avoid logging handled exceptions from my Vuejs app. I have read docs about filtering event and hints, but I'm not very clear about how to do that.

I'm using Vuejs NPM integration.

In Progress Needs Information Question

Most helpful comment

Hey,

Sentry.init({
  beforeSend(event) {
    try {
      if (event.exception.values[0].mechanism.handled) return null;
    } catch (o_O) {}
    return event;
  }
})

All 5 comments

Hey,

Sentry.init({
  beforeSend(event) {
    try {
      if (event.exception.values[0].mechanism.handled) return null;
    } catch (o_O) {}
    return event;
  }
})

Hi!

In couple of days I will back with a feedback.

Thank you!

Closing this to clean up our issue tracker. @CesarGomezTissini if the solution above doesn't work for you please comment back / re-open. Cheers!

Since 4 days ago, I haven't received new handled exceptions. Thanks guys. You can safely close this thread.

Thanks for letting us know, @CesarGomezTissini!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

THPubs picture THPubs  路  3Comments

Nickforall picture Nickforall  路  3Comments

nicolezhu picture nicolezhu  路  3Comments

kamilogorek picture kamilogorek  路  3Comments

rowlando picture rowlando  路  3Comments