Profer
Profer

Reputation: 643

Sentry not throwing error to the required mail

I have used Sentry in my node backend. Here is the process

Sentry.init({
  dsn: 'my address',
  // ...
});
Sentry.captureException(new Error("Something broke"));

Now I didn't get either any error or mail. Why I did wrong here?

Upvotes: 1

Views: 103

Answers (1)

Bruno Garcia
Bruno Garcia

Reputation: 6408

Do you let the app terminate immediately after running those two lines? If that's the case you likely killed the process before it had a change to flush (send to sentry) the event in its internal queue.

The docs describe the process of Shutting down and draining the queue.

Upvotes: 1

Related Questions