# Custom 404 Handler

## notfound

The notfound method allows you to customize the response of the 404 error code, it is possible to pass the html code in string format to the method.

```julia
notfound("""<!DOCTYPE html>
              <html>
              <head><title>Not found</title></head>
              <body><h1>404, Not found</h1></body>
              </html>""")
```

It is also possible to pass a path that includes the name of the html file to use. The path will start from the directory where the program is located or from the path specified as a base.

```julia
notfound("folder/notfound.html")
```


---

# 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://neomatrixcode.gitbook.io/merly/guide/custom-404-handler.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.
