Skip to content

Conversation

@kamilogorek
Copy link
Contributor

@vercel
Copy link

vercel bot commented Nov 2, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sentry/sentry-docs/4f8qrqzbe/sentry.dev
✅ Preview: https://sentry-docs-git-node-onfatalerror.sentry.dev

Copy link
Contributor

@MimiDumpling MimiDumpling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Kamil! 🌻


<Alert level="warning" title="Note">

Be aware that if you are overwriting this setting, you will lose the default implementation, which handles draining queued events before exiting. If you want to see how it works and recreates in your custom code, see the implementation of [`logAndExitProcess`](https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts) function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Be aware that if you are overwriting this setting, you will lose the default implementation, which handles draining queued events before exiting. If you want to see how it works and recreates in your custom code, see the implementation of [`logAndExitProcess`](https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts) function.
Be aware that if you are overwriting this setting, you will lose the default implementation, which handles draining queued events before exiting. If you want to examine how it works and then recreate it in your code, see the implementation of the [`logAndExitProcess`](https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts) function.

Co-authored-by: Katie Byers <katie.byers@sentry.io>
@kamilogorek kamilogorek merged commit df25c9c into master Nov 3, 2020
@kamilogorek kamilogorek deleted the node-onfatalerror branch November 3, 2020 09:53
@kamilogorek
Copy link
Contributor Author

Applied both suggestions. Thanks! :)

@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation suggestion: warn about using onFatalError Can't prevent Sentry SDK from exiting the process even with onFatalError

4 participants