Package + Version
Description
Using this code in a Next.js API:
import{captureException,flush,withSentry}from'@sentry/nextjs';consthandler=async()=>{try{thrownewError('This is a fake error meant to help testing Sentry error reporting (monitoring).');}catch(e){captureException(e);awaitflush(5000);// Need to flush on API to send errors properly (issue in @sentry/nextjs)}};exportdefaultwithSentry(handler);Calling the API endpoint runs until the Serverless function times out.
Providing a value to flush() doesn't seem to be effective.

Package + Version
@sentry/nextjs6.9.0Description
Using this code in a Next.js API:
Calling the API endpoint runs until the Serverless function times out.
Providing a value to
flush()doesn't seem to be effective.