# Troubleshoot Custom Pages

This page covers two symptoms of [Custom Pages](/en/documentation/platform/custom-pages/): a custom page set that is refused, and an error page that does not reach the client. Custom Pages is a Platform Resource that replaces the error response returned by a Connector with a page of your own, and the pages sit in a custom page set. For where Custom Pages acts on a request, refer to [Request path](/en/documentation/platform/custom-pages/#request-path). A quoted refusal is the API's message, unless the entry names another source.

---

## A custom page set is refused with Ensure this field has at least 1 elements

Creating a custom page set fails with `Ensure this field has at least 1 elements.`, or Azion Console refuses to save it with `You must have at least one custom page code`. Azion CLI prints the API message inside `Error: Failed to create Custom Page: [...]`.

A custom page set holds at least one page, and the request sent `"pages": []`, as the errors on [Custom page settings](/en/documentation/platform/custom-pages/settings/#errors) show. In Azion Console, the **Page Codes** table had no row.

- **Add a page to `pages`**: one page replaces one error status code with content from a Connector, as the body in [Request body](/en/documentation/platform/custom-pages/settings/#request-body) shows.
- **Add a page code in Azion Console**: the **Page Codes** table needs one row before you save the set.

Azion CLI then prints `Created Custom Page with ID <custom-page-id>`.

---

## An error page does not appear

The Connector's error response reaches the client unchanged, even though a custom page set holds a page for its status code.

A Workload uses a custom page set only once that Workload's deployment sets that custom page set. A page also acts only on the status code it lists, and a change to the deployment takes several minutes to propagate.

- **Set the custom page set in the deployment**: in Azion Console, select it in the **Custom Page** field of **Deployment Settings**, or pass `--custom-page` to `azion create workload-deployment` when you create the deployment. The Azion CLI has no command that updates a deployment. For the steps, refer to [Customize an error page](/en/documentation/guides/application-development/getting-started/customizing-error-response-page/#assign-the-set-in-the-workloads-deployment).
- **Check the status code the Connector returns**: compare it with the `code` of each page in the set, such as `"404"`.
- **Wait for the change to propagate**: Azion does not guarantee a duration, so repeat the request until the page answers. For more information, refer to [Propagation](/en/documentation/platform/workloads/how-it-works/#propagation).

The client then receives the page's content in place, with the page's `custom_status_code` when one is set, and no `Location` header.

---

## Related resources

- [Custom page settings](/en/documentation/platform/custom-pages/settings.md#errors): Every field of a custom page set and its pages, with the refusals the API and Azion Console return and what to do about each.
- [How Custom Pages works](/en/documentation/platform/custom-pages/how-it-works.md): How a page replaces an error response once the deployment sets the set, which most fixes here lean on.
- [Customize an error page](/en/documentation/guides/application-development/getting-started/customizing-error-response-page.md): Create a set with a page for each code and assign it in the Workload's deployment, from Azion Console, the CLI, or the API.
- [Custom Pages limits](/en/documentation/platform/custom-pages/limits.md): The minimum page count of a set and the range of each field of a page.
