Skip to content

withServerActionInstrumentation catches NEXT_REDIRECT and NEXT_NOT_FOUND errors #10466

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

Closed
3 tasks done
ianschmitz opened this issue Feb 1, 2024 · 4 comments · Fixed by #10474
Closed
3 tasks done

withServerActionInstrumentation catches NEXT_REDIRECT and NEXT_NOT_FOUND errors #10466

ianschmitz opened this issue Feb 1, 2024 · 4 comments · Fixed by #10474
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@ianschmitz
Copy link

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.99.0

Framework Version

14.1.0

Link to Sentry event

https://yellowpad-tl.sentry.io/issues/4933611798/events/b027a0b732e44edfa4da10f4f6d528fa/?project=4506667113185280

SDK Setup

{
    dsn: "https://ab637fbc48e826363f3cc7fbb1e0fc68@o4506114868117504.ingest.sentry.io/4506667113185280",
    tracesSampleRate: 1,
    debug: false,
}

Steps to Reproduce

Create a server action with the following:

"use server";

import { withServerActionInstrumentation } from "@sentry/nextjs";
import { headers } from "next/headers";

export async function someAction() {
  return await withServerActionInstrumentation(
      "foo",
      { headers: headers() },
      async () => {
          redirect("/some-path");
      },
  );
}

Expected Result

These exceptions should not be caught as per #7641.

Actual Result

An error is logged in Sentry issues:

CleanShot 2024-02-01 at 11 13 21

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 1, 2024
@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Feb 1, 2024
@lforst
Copy link
Member

lforst commented Feb 2, 2024

Ah right. Thanks for raising. This is an oversight but should be fixed easily. Backlogging!

@ishaangandhi
Copy link

What version of sentry do you have to have to no longer have this issue? I saw you completed this in #10474, but I am still running into this. I have 7.109.0.

@lforst
Copy link
Member

lforst commented Apr 5, 2024

@ishaangandhi would you mind creating a new issue with a reproduction example? Thank you!

@MisterJimson
Copy link

I'm also seeing this still on newest v7 (7.116.0).

Show's up in Spotlight as well during local dev. Working on a reprod but not reproducible in an isolated way yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK
Projects
Archived in project
4 participants