Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@honeybadger-io/nextjs

Package Overview
Dependencies
Maintainers
0
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@honeybadger-io/nextjs

Next.js integration for Honeybadger

  • 5.9.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6K
increased by86.78%
Maintainers
0
Weekly downloads
 
Created
Source

Honeybadger Next.js Integration

Node CI npm version npm dm npm dt

Documentation and Support

For comprehensive documentation and support, check out our documentation site.

The documentation includes a detailed Next.js integration guide.

Project Goals

The goal is to provide an idiomatic, simple integration of Honeybadger's exception monitoring service with Next.js applications.

Project Status

This version is considered suitable for preview.

Features

  • Automatic reporting of uncaught exceptions (see Limitations)
  • Breadcrumbs
  • Source map upload to Honeybadger
  • CLI command to generate Honeybadger configuration files for Next.js runtimes

Limitations

The following limitations are known to exist and will be tackled in future releases:

  • Issue link: A custom error component is used to report uncaught exceptions to Honeybadger. This is necessary because Next.js does not provide a way to hook into the error handler. This is not a catch-all errors solution.
    If you are using the Pages Router, there are some caveats to this approach, as reported here. This is a limitation of Next.js, not Honeybadger's Next.js integration. Errors thrown in middlewares or API routes will not be reported to Honeybadger, since when they reach the error component, the response status code is 404 and no error information is available. Additionally, there is an open issue about 404 being reported with Next.js apps deployed on Vercel, when they should be reported as 500.
    If you are using the App Router, these limitations do not apply, because errors thrown in middlewares or API routes do not reach the custom error component but are caught by the global window.onerror handler. However, some other server errors (i.e. from data fetching methods) will be reported with minimal information, since Next.js will send a generic error message to this component for better security.
  • Issue link: Source maps for the Edge runtime are not supported yet.

Example app

A separate repository, nextjs-with-honeybadger exists with an example app using this package. Follow the README instructions to run the example app.

Development

# install dependencies
npm install

# build for production
npm run build

License

This package is MIT licensed. See the MIT-LICENSE file in this folder for details.

Keywords

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc