Troubleshoot Custom Pages
Fix a custom page set that is refused for having no page, and an error page that does not replace the error response of a Connector.
This page covers two symptoms of 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. 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 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 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-pagetoazion create workload-deploymentwhen you create the deployment. The Azion CLI has no command that updates a deployment. For the steps, refer to Customize an error page. - Check the status code the Connector returns: compare it with the
codeof 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.
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.