NextJS with custom server: no errors, but lots of transactions

I’ve been followng the Next.js Getting Started guide but Sentry is not reporting any errors after following the ‘Verify’ section in the guide. I can however see that a development release was created in the Sentry dashboard, which is correctly reporting all transactions and Web Vitals.

I first assumed the lack of error reporting may be due to the development environment, so built the application (next build) with the component still present and tried to throw the error again. Immediately the build was shown on the ‘Releases’ list in the Sentry dashboard, but still could not get Sentry to report any errors.

After some digging, I set debug: true in both the client and server Sentry config files, and noticed the following error thrown in the console whenever trying to throw an error:

Sentry Logger [Error]: SentryError: An event processor returned null, will not send event.

Interestingly, I can see two POST requests being made to ingest.sentry.io when the error is thrown. The first contains a payload object with information related to the browser, and the second an object with all details relating to the error. I can see the correct error message is present in the exception property of the object, and both requests return a 200 status. The second request also responds with an {"id": "xyz"} object.

Trying to throw the error multiple times will always output the same error in the console, but does not create any additional HTTP requests.

I am also unable to receive any Sentry reports after calling Sentry.captureException(new Error("")), despite it also sending a successful HTTP request. This method does not produce any console errors relating to the event processor.

I am running a custom server with Express behind Next.js, and my next.config.js file is set up to also use the next-translate library. All project dependencies are using their latest versions.

Any ideas would be appreciated.