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
- 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;- Deploy to Vercel
- Open page
- Observe that no error has been reported to Sentry
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
autoInstrumentServerFunctions(which is on by default):