Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091<script lang="ts"> import { resolve } from "$app/paths"; import { getAuth } from "#lib/auth.svelte.ts"; import NotFound from "#lib/components/landing/NotFound.svelte"; import Button from "#lib/components/ui/Button.svelte";
let { status, message }: { status: number; message?: string } = $props();
// signed out, the root layout hands the 404 its own shell, so it draws the landing navbar const auth = getAuth();
const copy = $derived.by(() => { switch (status) { case 404: return { status: "404", title: "Page not found", message: "The page you're looking for doesn't exist. It may have been moved, deleted, or you have the wrong URL.", mark: "?", tone: "bg-background-inset text-foreground-muted" }; case 429: return { status: "429", title: "Tangled is busy", message: "We're getting more requests than we can serve right now. Give it a moment and try again.", mark: "429", tone: "bg-background-warning-subtle text-foreground-warning" }; case 503: return { status: "503", title: "Service unavailable", message: "We were unable to reach the service backing this page. It may be temporarily unavailable.", mark: "503", tone: "bg-background-info-subtle text-foreground-info" }; default: return { status: "500", title: "Internal server error", message: message ?? "We encountered an error while processing your request. Please try again later.", mark: "!", tone: "bg-background-danger-subtle text-foreground-danger" }; } });</script>
<svelte:head> <title>{copy.status} · Tangled</title> <meta name="robots" content="noindex" /></svelte:head>
{#if status === 404} <NotFound navbar={!auth.currentUser} />{:else} <section class="flex min-h-[60vh] flex-col items-center justify-center text-center"> <div class="mx-auto max-w-narrow rounded-lg bg-background-default p-2xl"> <div class="mb-xl"> <div class={`mx-auto mb-md flex size-16 items-center justify-center rounded-full ${copy.tone}`} > <span class="font-mono typography-heading-4 font-bold" aria-hidden="true" >{copy.mark}</span > </div> </div>
<div class="space-y-md"> <h1 data-testid="errorTitle" data-status={copy.status} class="typography-heading-3 font-bold text-foreground-default sm:typography-heading-2" > {copy.status} — {copy.title} </h1> <p data-testid="errorMessage" class="text-foreground-muted">{copy.message}</p> <div class="mt-xl flex flex-col items-center justify-center gap-sm sm:flex-row"> <Button href={resolve("/")} variant="default">Back to home</Button> </div> </div> </div> </section>{/if}