Custom Error Pages
Last edit: Apr 15, 2020
Instead of returning standard error pages, you can set up custom error pages that match your site's design and include information you'd like to convey to your users (e.g. helpful content, relevant links, encouragement to search or browse further).
You can customize the following error pages:
- 403 - Forbidden
- 404 - Not Found
- 500 - Server Error
- 503 - Maintenance
Creating a custom error page
Error pages are normal platformOS pages, so you can use all features of a page (e.g. layouts). To create a customized error page, create a Page and set the file name to the status code.
Example:
app/views/pages/404.html.liquid
---
layout_name: error_page
---
The resource you were looking for does not exist.
Error pages
| Status Code | Name | Usage |
|---|---|---|
| 403 | Forbidden | Solely used for a violated Authorization Policy. |
| 404 | Not Found | Rendered in multiple scenarios. Most commonly, it is rendered when you try to access or modify an object that does not exist. You can also set an Authorization Policy's http_status to 404 to force render this page instead of the default 403. |
| 500 | Server Error | If there is an error that cannot be handled gracefully, a server error page is displayed. |
| 503 | Maintenance | You can enable maintenance mode through the Partner Portal (see maintenance_mode attribute). |