import { withSentry } from '@sentry/nextjs' ; import { NextApiRequest , NextApiResponse } from 'next' ; const handler = async ( _req , _res ) : Promise < void > => { throw new Error ( 'API Error' ) ; } ; export default withSentry ( handler ) ;