Skip to content

NEXT_REDIRECT error to be reported as an Unhandled Error in Server Action redirect function. #14436

Closed
@NEKOYASAN

Description

@NEKOYASAN

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

8.40.0

Framework Version

React 19.0.0-rc-66855b96-20241106 & Next.js 15.0.3

Link to Sentry event

https://nekoyasan.sentry.io/issues/6082760807/events/a7a626e05026406bb3d13a68e8270c92/

Reproduction Example/SDK Setup

Reproduction Example: https://github.com/NEKOYASAN/next-sentry-redirect-minimum-repro

Reproduction Steps (From completely empty)

  1. pnpm create next-app
  2. npx @sentry/wizard@latest -i nextjs --saas
  3. add Server Action & Components (redirect function in Server Action)

Steps to Reproduce

  1. pnpm run build
  2. pnpm run start
  3. Click Redirect to example page Button
  4. Redirects normally to /example (but NEXT_REDIRECT Error is reported to Sentry)

Expected Result

Maybe NEXT_REDIRECT should not be reported to Sentry.

Actual Result

Server Action reports NEXT_REDIRECT as Unhandled Error.

but it does not seem to be reported in page.tsx, so there seems to be no problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions