Catch unhandled errors and promise rejections in Electron apps with customizable logging and error dialogs.
electron-unhandled is a lightweight Node.js module designed specifically for Electron applications. It catches unhandled errors and promise rejections that would otherwise cause silent crashes or unexpected behavior. The module provides configurable error logging and can display user-friendly error dialogs in production environments.
Electron developers building desktop applications who need reliable error handling across both main and renderer processes. It's particularly useful for teams wanting to improve application stability and user experience.
Developers choose electron-unhandled because it's specifically designed for Electron's multi-process architecture, requires minimal configuration, and provides production-ready error dialogs with optional GitHub issue reporting integration.
Catch unhandled errors and promise rejections in your Electron app
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Catches unhandled errors and promise rejections in both main and renderer processes, as emphasized in the usage notes, ensuring no error slips through the cracks in Electron's multi-process architecture.
Automatically presents user-friendly error dialogs in production environments, with an optional report button for GitHub issue creation, as shown in the screenshot and example code, improving UX without extra work.
Allows integration with external services like Sentry through a customizable logger function in the options, making it easy to add advanced error tracking with minimal configuration.
Provides a logError function for manually logging caught errors with consistent formatting, ensuring uniformity in error reporting across the application, as detailed in the API section.
Requires Electron 30 or later, as stated in the README, which can exclude legacy projects or teams slow to upgrade, limiting adoption in older codebases.
All options must be specified in the main process only, as noted in the API documentation, reducing flexibility for renderer-specific error handling setups and potentially complicating multi-window apps.
While effective for core error catching, it lacks advanced features such as error analytics, custom UI themes, or detailed error grouping, which might be needed for complex monitoring scenarios.