
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
lit-fastify-bugsnag
Advanced tools
Easily send your application errors to Bugsnag from your Fastify server.
npm install fastify-bugsnag --save
# OR
yarn add fastify-bugsnag
const fastify = require('fastify')();
fastify.register(require('fastify-bugsnag'), {
key: 'Your-Bugsnag-API-Key', // Defaults to process.env.BUGSNAG_API_KEY
enableReporting: process.env.NODE_ENV === 'production', // OR similar
bugsnagOptions: {
appType: 'web',
}
});
fastify.get('/', async (request, reply) => {
fastify.bugsnag.leaveBreadcrumb('Visited homepage'); // OR request.bugsnag.leaveBreadcrumb();
});
fastify.get('/error', async (request, reply) => {
request.bugsnag.notify(new Error('This is a generic error'));
});
The plugin will decorate fastify instance with bugsnag
property and request
as well. The value behind bugsnag
, is
a full BugsnagClient. Bugsnag documentation
Be aware that the plugin mimics the behaviour of
official Bugsnag Express plugin with appending
the request data to the error. That includes body
, query
and params
which may include user data!
Parameter | Default Value | Description |
---|---|---|
key | process.env.BUGSNAG_API_KEY | API Key obtained from Bugsnag dashboard project. REQUIRED |
enableReporting | undefined | Set to true on environments or under conditions you want to report the errors to Bugsnag. |
bugsnagOptions | {} | Additional configuration options for Bugsnag Client. |
Licensed under MIT.
FAQs
Fastify plugin for Bugsnag
We found that lit-fastify-bugsnag 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.