{"id":25836035,"url":"https://github.com/bugsplat-git/bugsplat-node","last_synced_at":"2025-08-14T00:06:55.990Z","repository":{"id":49066955,"uuid":"289114183","full_name":"BugSplat-Git/bugsplat-node","owner":"BugSplat-Git","description":"BugSplat integration with helpers for node.js environments","archived":false,"fork":false,"pushed_at":"2024-02-09T00:08:09.000Z","size":54,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T02:47:58.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BugSplat-Git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-08-20T21:27:26.000Z","updated_at":"2022-04-14T18:22:55.000Z","dependencies_parsed_at":"2024-02-09T01:35:00.780Z","dependency_job_id":"acc848f7-b6a5-45c3-a7b4-c2c8806a6552","html_url":"https://github.com/BugSplat-Git/bugsplat-node","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"f618313593be339d7c5140130ea6ffd6aff06d55"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/BugSplat-Git/bugsplat-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fbugsplat-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fbugsplat-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fbugsplat-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fbugsplat-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BugSplat-Git","download_url":"https://codeload.github.com/BugSplat-Git/bugsplat-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BugSplat-Git%2Fbugsplat-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270336686,"owners_count":24566779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-01T01:38:56.892Z","updated_at":"2025-08-14T00:06:55.946Z","avatar_url":"https://github.com/BugSplat-Git.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![bugsplat-github-banner-basic-outline](https://user-images.githubusercontent.com/20464226/149019306-3186103c-5315-4dad-a499-4fd1df408475.png)](https://bugsplat.com)\n\u003cbr/\u003e\n# \u003cdiv align=\"center\"\u003eBugSplat\u003c/div\u003e \n### **\u003cdiv align=\"center\"\u003eCrash and error reporting built for busy developers.\u003c/div\u003e**\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://twitter.com/BugSplatCo\"\u003e\n        \u003cimg alt=\"Follow @bugsplatco on Twitter\" src=\"https://img.shields.io/twitter/follow/bugsplatco?label=Follow%20BugSplat\u0026style=social\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/K4KjjRV5ve\"\u003e\n        \u003cimg alt=\"Join BugSplat on Discord\" src=\"https://img.shields.io/discord/664965194799251487?label=Join%20Discord\u0026logo=Discord\u0026style=social\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n## 👋 Introduction\n\nBugSplat-node is a JavaScript error reporting system for Node.js and Electron applications. Before continuing with the tutorial please make sure you have completed the following checklist:\n* [Sign Up](https://app.bugsplat.com/v2/sign-up) as a new BugSplat user\n* Complete the [Welcome](https://app.bugsplat.com/v2/welcome) workflow and make a note of your BugSplat database\n* Review our [my-node-crasher](https://github.com/BugSplat-Git/my-node-crasher) or [my-electron-crasher](https://github.com/BugSplat-Git/my-electron-crasher) projects to see a sample Node.js project integrated with BugSplat\n\n## ⚙️ Configuration\n\nTo add the bugsplat package to your application, run the following shell command at the root of your project’s directory:\n```shell\nnpm install --save bugsplat-node\n```\nRequire the bugsplat module at the entry point of your application. \n```js\nconst { BugSplatNode } = require(\"bugsplat-node\");\n```\nCreate a new instance of the BugSplat class with the name of your BugSplat database, the name of your application and the version of your application:\n ```js\n const bugsplat = new BugSplatNode(\"DatabaseName\", \"AppName\", \"1.0.0.0\");\n ```\nSet the bugsplat.post function as an event handler for uncaught exceptions:\n```js\nprocess.on(\"uncaughtException\", bugsplat.postAndExit);\n```\nIf your application uses promises you will also want to listen for unhandled promise rejections. Please note that this will only work for native promises:\n```js\nprocess.on(\"unhandledRejection\", bugsplat.postAndExit);\n```\n\nThrow an exception after the event handler has been added. \n```js\nthrow new Error(\"BugSplat!\");\n```\n\nYou can also use bugsplat-node to post errors from non-fatal promise rejections and errors that originate inside of try-catch blocks:\n```js\nPromise.reject(new Error(\"BugSplat!\")).catch(error =\u003e bugsplat.post(error, {}));\n```\n```js\ntry {\n    throw new Error(\"BugSplat\");\n} catch(error) {\n    await bugsplat.post(error, {});\n}\n```\n\nAfter posting an error with bugsplat-node, navigate to the [Crashes](https://app.bugsplat.com/v2/crashes?database=Demo) page. You should see a new crash report for the application you just configured. Click the link in the ID column to see details about your crash on the [Crash](https://app.bugsplat.com/v2/crash?database=Demo\u0026id=405) page:\n\n![Crashes](https://github.com/BugSplat-Git/bugsplat-node/assets/2646053/bfd16519-d2c4-40c1-bbad-ed3ef07e1e75)\n\n![Crash](https://github.com/BugSplat-Git/bugsplat-node/assets/2646053/644a25dc-b454-47c5-8ae4-929a3070424b)\n\nThat’s it! Your application is now configured to post crash reports to BugSplat.\n\n## 🧩 API\n\nIn addition to the configuration demonstrated above, there are a few public methods that can be used to customize your BugSplat integration:\n```js\nbugsplat.setDefaultAppKey(appKey); // Additional metadata that can be queried via BugSplat's web application\nbugsplat.setDefaultUser(user); // The name or id of your user\nbugsplat.setDefaultEmail(email); // The email of your user\nbugsplat.setDefaultDescription(description); // Additional info about your crash that gets reset after every post\nbugsplat.setDefaultAdditionalFilePaths(paths); // Paths to files to be added at post time (limit 10MB)\nbugsplat.postAndExit(error); // Wrapper for post that calls process.exit(1) after posting error to BugSplat\nbugsplat.post(error, options); // Posts an arbitrary Error object to BugSplat\n// If the values options.appKey, options.user, options.email, options.description, options.additionalFilePaths are set the corresponding default values will be overwritten\n// Returns a promise that resolves with properties: error (if there was an error posting to BugSplat), response (the response from the BugSplat crash post API), and original (the error passed by bugsplat.post)\n```\n\n## 🤔 Additional Considerations\n\nIt is recommended that you exit and restart your application after an uncaughtException or unhandledRejection occurs. Packages such as [pm2](https://www.npmjs.com/package/pm2) and [forever](https://www.npmjs.com/package/forever) can be configured to restart your application.\n\nAdditionally you can use [domains](https://nodejs.org/api/domain.html#domain_warning_don_t_ignore_errors) to handle errors differently across various parts of your application. Domains are pending deprecation according the the Node.js [documentation](https://nodejs.org/api/domain.html), however a suitable replacement has not been added yet.\n\nMore information regarding domain deprecation can be found [here](https://github.com/nodejs/node/issues/10843).\n\n## 🧑‍💻 Contributing\n\nBugSplat loves open source software! Please check out our project on [GitHub](https://github.com/BugSplat-Git/bugsplat-node) and send us a [pull request](https://github.com/BugSplat-Git/bugsplat-node/pulls). Found an bug or have a feature request? Open an [issue](https://github.com/BugSplat-Git/bugsplat-node/issues) and we'll address it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fbugsplat-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugsplat-git%2Fbugsplat-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugsplat-git%2Fbugsplat-node/lists"}