# Error pages

## Errors handling

When an error occurs on a page, the error is intercepted by an error route.

The page is defined by `src/app/error.tsx` and it renders the component `<PageError />`

<figure><img src="/files/b0p9QHIkXsDtGlQtjRe7" alt=""><figcaption><p>PageError component</p></figcaption></figure>

You can define specific error pages by adding an `error.tsx` file to a nested route, for instance inside the folder `src/app/dashboard/`

## Not Found

<figure><img src="/files/XJmFSN9wSccWuwqf4csf" alt=""><figcaption></figcaption></figure>

If a page route doesn't exist, the Not Found page is rendered.

Customize it by editing the file `src/app/not-found.tsx`

{% hint style="info" %}
Learn more about [Next.js Error Handling](https://nextjs.org/docs/app/building-your-application/routing/error-handling)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shipped.club/features/error-pages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
