René's URL Explorer Experiment


Title: Can't prevent Sentry SDK from exiting the process even with onFatalError · Issue #1661 · getsentry/sentry-javascript · GitHub

Open Graph Title: Can't prevent Sentry SDK from exiting the process even with onFatalError · Issue #1661 · getsentry/sentry-javascript

X Title: Can't prevent Sentry SDK from exiting the process even with onFatalError · Issue #1661 · getsentry/sentry-javascript

Description: @sentry/node version: 4.1.1 Node.js version: 10.9.0 Sentry exits my process after an uncaught exception even I provide my own implementation of onFatalError. How can I prevent that? Here is a minimal working example. Without sentry.init ...

Open Graph Description: @sentry/node version: 4.1.1 Node.js version: 10.9.0 Sentry exits my process after an uncaught exception even I provide my own implementation of onFatalError. How can I prevent that? Here is a minim...

X Description: @sentry/node version: 4.1.1 Node.js version: 10.9.0 Sentry exits my process after an uncaught exception even I provide my own implementation of onFatalError. How can I prevent that? Here is a minim...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/1661

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't prevent Sentry SDK from exiting the process even with onFatalError","articleBody":"@sentry/node version: 4.1.1\r\nNode.js version: 10.9.0\r\n\r\nSentry exits my process after an uncaught exception even I provide my own implementation of onFatalError. How can I prevent that?\r\n\r\nHere is a minimal working example. Without `sentry.init` I get to the 2nd throw. With it the process finisches after the 1st one.\r\n\r\n```\r\nconst sentry = require('@sentry/node');\r\n\r\nsentry.init(\r\n  { dsn: 'https://key@mysentry.mycompany/2', \r\n    integrations: [new sentry.Integrations.OnUncaughtException({\r\n      onFatalError: error => {\r\n        console.log('an error occured', error);\r\n      }\r\n    })]\r\n  }\r\n);\r\n\r\nprocess.on('uncaughtException', err => {\r\n  console.log(err, 'Uncaught Exception thrown');\r\n  // process.exit(1);\r\n});\r\n\r\nconsole.log(\"before throwing the first time\")\r\nsetTimeout(() => { throw 42 }, 2000)\r\nsetTimeout(() => { console.log('still running') }, 10000)\r\nthrow 42;\r\n```","author":{"url":"https://github.com/crunchtime-ali","@type":"Person","name":"crunchtime-ali"},"datePublished":"2018-10-17T14:25:34Z","url":"https://github.com/getsentry/sentry-javascript/issues/1661"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4a23ba3c-b657-403b-29a5-f47d0e5343bb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE710:36DAFB:611C6E:88D391:6B0449E9
html-safe-noncee476176a4bde0bba622a16ab344e14cb9c35020da0ad276043312926451720f9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzEwOjM2REFGQjo2MTFDNkU6ODhEMzkxOjZCMDQ0OUU5IiwidmlzaXRvcl9pZCI6IjcyMDE1NjI0MTkzODExNjA0MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac12538bf0ea59ca917d5578b0c2fc13283bc8427f09b68e82984d36ae5421a61f
hovercard-subject-tagissue:371104946
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/1661/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4ea88c6a29b92f48b0125070428f134e85b5eab0e2ad7d58bfb1a5ab8f9aca4c/getsentry/sentry-javascript/issues/1661
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4ea88c6a29b92f48b0125070428f134e85b5eab0e2ad7d58bfb1a5ab8f9aca4c/getsentry/sentry-javascript/issues/1661
og:image:alt@sentry/node version: 4.1.1 Node.js version: 10.9.0 Sentry exits my process after an uncaught exception even I provide my own implementation of onFatalError. How can I prevent that? Here is a minim...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecrunchtime-ali
hostnamegithub.com
expected-hostnamegithub.com
Noned4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/1661#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F1661
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F1661
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/1661
Reloadhttps://github.com/getsentry/sentry-javascript/issues/1661
Reloadhttps://github.com/getsentry/sentry-javascript/issues/1661
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues340 (340)https://github.com/getsentry/sentry-javascript/issues
Pull requests55 (55)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/1661
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/1661
getsentry/sentry-docs#2643https://github.com/getsentry/sentry-docs/pull/2643
Can't prevent Sentry SDK from exiting the process even with onFatalErrorhttps://github.com/getsentry/sentry-javascript/issues/1661#top
getsentry/sentry-docs#2643https://github.com/getsentry/sentry-docs/pull/2643
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
8.0.0https://github.com/getsentry/sentry-javascript/milestone/15
https://github.com/crunchtime-ali
crunchtime-alihttps://github.com/crunchtime-ali
on Oct 17, 2018https://github.com/getsentry/sentry-javascript/issues/1661#issue-371104946
https://github.com/HazAT
HazAThttps://github.com/HazAT
on Oct 17, 2018https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-430666538
https://docs.sentry.io/learn/draining/?platform=nodehttps://docs.sentry.io/learn/draining/?platform=node
https://github.com/kamilogorek
kamilogorekhttps://github.com/kamilogorek
on Oct 17, 2018https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-430666925
https://github.com/crunchtime-ali
crunchtime-alihttps://github.com/crunchtime-ali
on Oct 18, 2018https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-430892839
@kamilogorekhttps://github.com/kamilogorek
https://github.com/kamilogorek
kamilogorekhttps://github.com/kamilogorek
on Oct 18, 2018https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-430919033
https://github.com/crunchtime-ali
crunchtime-alihttps://github.com/crunchtime-ali
on Oct 18, 2018https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-430959028
crunchtime-alihttps://github.com/crunchtime-ali
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 18, 2018https://github.com/getsentry/sentry-javascript/issues/1661#event-1911861170
https://github.com/JamesHagerman
JamesHagermanhttps://github.com/JamesHagerman
on Oct 28, 2020https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-718200921
@kamilogorekhttps://github.com/kamilogorek
https://docs.sentry.io/platforms/node/configuration/integrations/default-integrations/#onuncaughtexceptionhttps://docs.sentry.io/platforms/node/configuration/integrations/default-integrations/#onuncaughtexception
https://github.com/mayfield
mayfieldhttps://github.com/mayfield
on Mar 14, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1067259009
https://github.com/kamilogorek
kamilogorekhttps://github.com/kamilogorek
on Mar 15, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1067703322
https://nodejs.org/api/process.html#event-uncaughtexceptionhttps://nodejs.org/api/process.html#event-uncaughtexception
https://docs.sentry.io/platforms/node/configuration/integrations/default-integrations/#onuncaughtexceptionhttps://docs.sentry.io/platforms/node/configuration/integrations/default-integrations/#onuncaughtexception
https://github.com/mayfield
mayfieldhttps://github.com/mayfield
on Mar 15, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1068543675
@kamilogorekhttps://github.com/kamilogorek
https://nodejs.org/api/process.html#event-uncaughtexceptionmonitorhttps://nodejs.org/api/process.html#event-uncaughtexceptionmonitor
https://github.com/kamilogorek
kamilogorekhttps://github.com/kamilogorek
on Mar 16, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1068955062
sentry-javascript/packages/utils/src/instrument.tshttps://github.com/getsentry/sentry-javascript/blob/cc4495790e49b654e2f1d1e65c64e95de9f5a1ef/packages/utils/src/instrument.ts#L583-L621
cc44957https://github.com/getsentry/sentry-javascript/commit/cc4495790e49b654e2f1d1e65c64e95de9f5a1ef
sentry-javascript/packages/node/src/integrations/utils/errorhandling.tshttps://github.com/getsentry/sentry-javascript/blob/cc4495790e49b654e2f1d1e65c64e95de9f5a1ef/packages/node/src/integrations/utils/errorhandling.ts#L32
cc44957https://github.com/getsentry/sentry-javascript/commit/cc4495790e49b654e2f1d1e65c64e95de9f5a1ef
https://github.com/ibc
ibchttps://github.com/ibc
on May 25, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1136979565
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
on May 30, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1140845041
AbhiPrasadhttps://github.com/AbhiPrasad
on May 30, 2022https://github.com/getsentry/sentry-javascript/issues/1661#event-6700840930
AbhiPrasadhttps://github.com/AbhiPrasad
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
Package: nodehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20node%22
Status: Backloghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Backlog%22
on May 30, 2022https://github.com/getsentry/sentry-javascript/issues/1661#event-6700842621
https://github.com/lforst
lforsthttps://github.com/lforst
on May 30, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1140850595
process.listeners('uncaughtException')https://nodejs.org/docs/latest-v8.x/api/events.html#events_emitter_listeners_eventname
https://github.com/ibc
ibchttps://github.com/ibc
on May 30, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1140939874
#5176https://github.com/getsentry/sentry-javascript/pull/5176
lforsthttps://github.com/lforst
8.0.0https://github.com/getsentry/sentry-javascript/milestone/15
on Jun 1, 2022https://github.com/getsentry/sentry-javascript/issues/1661#event-6718547815
https://github.com/dzlandis
dzlandishttps://github.com/dzlandis
on Aug 8, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1207536923
https://github.com/maxpain
maxpainhttps://github.com/maxpain
on Oct 29, 2022https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1295940806
https://github.com/HazAT
HazAThttps://github.com/HazAT
on Jan 26, 2023https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1404697999
#4154https://github.com/getsentry/sentry-javascript/issues/4154
https://github.com/HazAT
HazAThttps://github.com/HazAT
on Feb 16, 2023https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1432729852
#6146https://github.com/getsentry/sentry-javascript/issues/6146
https://github.com/chr4ss12
chr4ss12https://github.com/chr4ss12
on Apr 4, 2023https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1496658395
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
on Apr 5, 2023https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-1497213290
https://nodejs.org/api/process.html#warning-using-uncaughtexception-correctlyhttps://nodejs.org/api/process.html#warning-using-uncaughtexception-correctly
hubertdeng123https://github.com/hubertdeng123
Status: Backloghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Backlog%22
on Jul 26, 2023https://github.com/getsentry/sentry-javascript/issues/1661#event-9926456246
https://github.com/lforst
lforsthttps://github.com/lforst
on Apr 10, 2024https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-2047387436
elastic/apm-agent-nodejs#2367 (comment)https://github.com/elastic/apm-agent-nodejs/issues/2367#issuecomment-1670408202
https://github.com/lforst
lforsthttps://github.com/lforst
on Apr 10, 2024https://github.com/getsentry/sentry-javascript/issues/1661#issuecomment-2047704012
#11532https://github.com/getsentry/sentry-javascript/pull/11532
https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#behaviour-in-combination-with-onuncaughtexception-handlers-in-nodejshttps://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#behaviour-in-combination-with-onuncaughtexception-handlers-in-nodejs
lforsthttps://github.com/lforst
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 10, 2024https://github.com/getsentry/sentry-javascript/issues/1661#event-12423112251
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/1661
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/1661
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
8.0.0https://github.com/getsentry/sentry-javascript/milestone/15
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.