import { NextResponse } from 'next/server'; export async function POST(req: Request) { try { const rawText = await req.text(); // Sentry sends NDJSON (Newline Delimited JSON). Split by newline to parse safely. const items = rawText.split('\n').filter(Boolean).map(line => JSON.parse(line)); console.log("CLIENT ERROR INTERCEPTED:", JSON.stringify(items[0], null, 2)); } catch (e) { console.log("Failed to parse relay body (NDJSON)", e); } return NextResponse.json({ success: true }); }