Skip to content

In Next.js-project, errors inside pages/api not caught by Sentry when deployed on Vercel #11708

Closed
@Danane84

Description

@Danane84

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

7.111.0

Framework Version

Next.jsj 13.5.6

Link to Sentry event

No response

SDK Setup

Sentry.init({
dsn: SENTRY_DSN,

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});

Steps to Reproduce

Create a Next.js app, add Sentry, deploy on Vercel

Expected Result

Errors from the pages/api folder are reported in Sentry, when deployed on Vercel

Actual Result

Errors from the pages/api folder are not reported in Sentry, when deployed on Vercel

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions