
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
no-unhandledrejection
Advanced tools
Simple lightweight (379B gzip size) processing unhandledRejection
error library prevents unhandledRejection
from causing program crashes. The usage scenario is that not all async
functions need to be try catch.
$ npm i no-unhandledrejection -S
// Browser
import noUnhandledRejection from 'no-unhandledrejection'
noUnhandledRejection()
// Node
require('no-unhandledrejection')()
// With Sentry
require('no-unhandledrejection')({
callback (e) {
Raven.captureException(e)
}
})
Type: Boolean
Default: false
Enable this plugin only under the production mode (process.env.NODE_ENV === 'production'
).
Type: Function
Default: noop
A generic callback function that handles unhandledRejection. Usually used for reporting such as Error Tracking or global error notification.
Copyright (c) 2017-present, Army-U. Released under the MIT License.
FAQs
Simple plugin to avoid unhandledrejection error
We found that no-unhandledrejection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.