Skip to content
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

Errors aren't being reported in Next.js data-fetching methods on Vercel #6117

Closed
lforst opened this issue Nov 2, 2022 · 0 comments · Fixed by #6578
Closed

Errors aren't being reported in Next.js data-fetching methods on Vercel #6117

lforst opened this issue Nov 2, 2022 · 0 comments · Fixed by #6578
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Bug

Comments

@lforst
Copy link
Member

lforst commented Nov 2, 2022

When run on Vercel, the Next.js SDK currently doesn't capture any errors thrown in Next.js data fetching methods. The runtime just quits without reporting the error.

Steps to reproduce

  1. Have page with data fetcher and autoInstrumentServerFunctions (which is on by default):
const MyComponent = () => {
  return <h1>Hello World!</h1>;
};

export const getServerSideProps = async (context) => {
  if (context.params?.myParam === "two") {
    // only throw conditionally so that this page actually builds
    throw new Error("We don't like page two!");
  }

  return { props: {} };
};

export default MyComponent;
  1. Deploy to Vercel
  2. Open page
  3. Observe that no error has been reported to Sentry
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 Type: Bug
Projects
None yet
1 participant