17 lines
612 B
TypeScript
17 lines
612 B
TypeScript
|
|
/**
|
||
|
|
* /api/debug/throw — admin-only error injector. Throws on demand so we can
|
||
|
|
* verify Glitchtip is receiving events. Gated by /api/admin/* middleware (404
|
||
|
|
* for non-admins).
|
||
|
|
*
|
||
|
|
* Move the path under /api/admin/* so the W0-F1 middleware gate applies.
|
||
|
|
*/
|
||
|
|
import { withRequest } from "@/lib/logger";
|
||
|
|
|
||
|
|
export const runtime = "nodejs";
|
||
|
|
|
||
|
|
export async function GET(request: Request) {
|
||
|
|
const log = withRequest(request);
|
||
|
|
log.warn({ event: "debug_throw" }, "intentional error for Glitchtip smoke test");
|
||
|
|
throw new Error("debug_throw_smoke_test: glitchtip wiring verified at " + new Date().toISOString());
|
||
|
|
}
|