SPB Git
1.1 KB · 23 lines tsx
1'use client';23import Link from 'next/link';45/** Rendering/API failure. Framed as OUR failure (spec §57) — never as an Internet event. */6export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {7  return (8    <div className="mx-auto flex min-h-[60vh] max-w-[720px] flex-col items-start justify-center gap-4 px-5 py-16">9      <p className="label text-warn">Instrument error</p>10      <h1 className="text-2xl font-medium tracking-tight">The observatory could not render this page.</h1>11      <p className="text-ink-2">This is a failure of our own pipeline or API, not a measurement of the Internet. {error.digest && <span className="num text-ink-3">ref {error.digest}</span>}</p>12      <div className="flex gap-4 text-sm">13        <button type="button" onClick={reset} className="rounded-[4px] border border-line px-3 py-1.5 text-ink hover:border-line-2">14          Retry15        </button>16        <Link href="/" className="py-1.5 text-accent hover:underline">17          Back to the gauge18        </Link>19      </div>20    </div>21  );22}23
Files · 2ad054aee22a11bbac5c2a273c5d186a8a903b50
Menu

Theme