Back to ✨ Feature Scaffolding

Custom 404/500 Pages

UXNext.jsError Handling
---
description: Create branded error pages
---

1. **Create Not Found**:
- Create src/app/not-found.tsx.
import Link from 'next/link';
export default function NotFound() {
return (
<div>
<h2>Not Found</h2>
<p>Could not find requested resource</p>
<Link href="/">Return Home</Link>
</div>
);
}


2. **Create Error Page**:
- Create src/app/error.tsx for generic server errors.

3. **Pro Tips**:
- Add a search bar or helpful links to your 404 page to keep users engaged.
By Antigravity Team

How to Use This Workflow

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/workflows/
  3. Save the file as create-custom-404-500-error-pages-nextjs.md
  4. In Antigravity, type /create_custom_404_500_error_pages_nextjs or just describe what you want to do

Learn more about workflows →

Related Workflows

Recommended Rules

View more rules →

Recommended MCP Servers

View more MCP servers →

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide