import { NextRequest, NextResponse } from 'next/server' import { auth } from '@/auth' export async function POST(request: NextRequest) { const session = await auth() if (!session?.user?.id) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } try { const body = await request.json() console.error('[CLIENT-ERROR-REPORT]', JSON.stringify(body, null, 2)) } catch { // ignore malformed payload } return NextResponse.json({ ok: true }) }