# Custom Error Pages

Custom error pages are created by default in Project Zero. These pages are **400, 403, 404** and **500** pages and their files are located under the templates directory. If you want to create a page other than these error codes, you need to create an html file under the templates directory. For example, templates/502.html file should be created for 502 error. The contents of this sample file are as follows.

```
{% extends 'layout/base.html' %}
 
{% block content %}
 <section>
   <h2>502 Bad Gateway</h2>
   <a href="/">{{ _('Return to homepage') }}</a>
 </section>
{% endblock %}
```


---

# 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.akinon.com/technical-guides/project-zero/django/project-structure/custom-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.
