The Not Found Pattern

Gracefully handle broken links. Your project comes pre-configured with a not-found.html file that acts as the global 404 handler.

Browser Request
GET /unknown-page
No Match

Automatic Fallback

renders
src/app/not-found.html

Standard Behavior

Every new Caspian project includes this file at the root of your app folder. It catches errors anywhere in your application.

Zero configuration required in Python.
Automatically inherits root/layout.html.

Default Template

src/app/not-found.html

The file comes pre-filled with a simple 404 UI. You can edit this file to match your brand using PulsePoint and Tailwind.

HTML Template
<div class="grid h-screen place-content-center bg-background px-4">
  <div class="text-center">
    <h1 class="text-9xl font-black text-muted">404</h1>
    
    <p class="text-2xl font-bold tracking-tight text-foreground sm:text-4xl">
      Uh-oh!
    </p>

    <p class="mt-4 text-muted-foreground">
      We can't find that page.
    </p>
    
    <!-- Use standard links to return -->
    <a href="/" class="btn btn-primary mt-6">
      Go Back Home
    </a>
  </div>
</div>

Why default matters?

Without this file, your app would show a generic server error for invalid URLs. The scaffolded not-found.html ensures your app feels polished and professional from the very first run.