Every app/api route handler now goes through withRouteLogging, which logs a correlated reqId/method/path/status/duration for each request and turns any uncaught error into a logged stack trace plus a clean JSON 500 instead of Next's default opaque failure. proxy.ts logs rejected auth attempts, and instrumentation.ts's onRequestError catches anything that still escapes a route handler. Also adds a minimal not-found page matching the app's card styling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
27 lines
975 B
TypeScript
27 lines
975 B
TypeScript
import Link from "next/link";
|
|
import type { Metadata } from "next";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Card, CardContent } from "@/components/ui/card";
|
|
import { BrandMark } from "@/components/layout/BrandMark";
|
|
|
|
export const metadata: Metadata = { title: "Not found" };
|
|
|
|
export default function NotFound() {
|
|
return (
|
|
<div className="flex min-h-dvh items-center justify-center p-4">
|
|
<Card className="bp-glass w-full max-w-sm">
|
|
<CardContent className="flex flex-col items-center gap-4 py-4 text-center">
|
|
<BrandMark size={32} />
|
|
<div className="space-y-1">
|
|
<p className="bp-readout bp-gradient-text text-4xl font-semibold">404</p>
|
|
<p className="text-sm text-muted-foreground">This page doesn't exist.</p>
|
|
</div>
|
|
<Button asChild size="sm">
|
|
<Link href="/">Back to dashboard</Link>
|
|
</Button>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|