Skip to content

@sentry/nextjs not reporting issues i serverless functions #3643

Closed
@ThePaulMcBride

Description

@ThePaulMcBride

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

6.5.1

Description

I've recently started using the @sentry/nextjs package for a Nextjs site. I've followed through with the installation guide with one exception. I'm using environment variables instead of the file generated by the wizard. On the client side it works great, the releases and bugs are being tracked, but I'm getting no reports from my serveless functions when they throw errors.

import { withSentry } from "@sentry/nextjs";

const handler = async (req, res) => {
  throw new Error("API throw error test");
  res.status(200).json({ name: "John Doe" });
};

export default withSentry(handler);

This is the serverless function I am testing and nothing is showing up in my Sentry dashboard when it fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions