Skip to content

feat(nextjs): withHoneybadger wrapper for route handlers and middleware #1435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 15, 2025

Conversation

subzero10
Copy link
Member

@subzero10 subzero10 commented May 13, 2025

Status

READY

Description

  • Exports a withHoneybadger wrapper method that can be used with api route handlers or middleware to report errors to Honeybadger.
  • Fixes error TypeError: Class extends value undefined is not a constructor or null. This error is caused honeybadger.config.edge.js and honeybadger.config.server.js used to import Honeybadger from @honeybadger-io/react. This package also exports a class component HoneybadgerErrorBoundary. Class components are not supported in React Server Components.

@subzero10 subzero10 self-assigned this May 13, 2025
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change here is that I moved all the contents of this file into webpack.ts.

@subzero10 subzero10 requested a review from stympy May 13, 2025 17:44
@subzero10 subzero10 merged commit e610760 into master May 15, 2025
10 checks passed
@subzero10 subzero10 deleted the with-honeybadger-1414 branch May 15, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants