sentry-javascript: Infinite error reporting loop on HTTP Error (429)

My previous issue has been removed, not sure why

Package + Version

  • @sentry/browser - 4.2.0
  • @sentry/node - 4.2.0

Description

If request limit is hit with sentry, it enters infinite loop of reporting it’s own HTTP Error (429) that it made to sentry

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 8
  • Comments: 17 (9 by maintainers)

Most upvoted comments

@aguynamedben we’ll release it Today/Tomorrow after merging some outstanding code. It’ll definitely be done before the end of the week.

I have found a workaround for now: just ignore 429 errors in beforeSend. it’s a slightly shotgun approach, but makes the infinite retry loop go away.

Sentry.init({
  dsn: 'https://123@sentry.io/123',
  debug: true,
  beforeSend(event) {
    return event.message.match(/SentryError: HTTP Error \(429\)/) ? null : event;
  },
});