Skip to content

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

Description

@lforst

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):
constMyComponent=()=>{return<h1>HelloWorld!</h1>;};exportconstgetServerSideProps=async(context)=>{if(context.params?.myParam==="two"){// only throw conditionally so that this page actually buildsthrownewError("We don't like page two!");}return{props: {}};};exportdefaultMyComponent;
  1. Deploy to Vercel
  2. Open page
  3. Observe that no error has been reported to Sentry

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions