import * as Sentry from "@sentry/nextjs"; import { NextResponse } from "next/server"; export const dynamic = "force-dynamic"; // A faulty API route to test Sentry's error monitoring export function GET() { const testError = new Error("Sentry Example API Route Error"); Sentry.captureException(testError); return NextResponse.json({ error: "This is a test error from the API route" }, { status: 500 }); }