Error page
Error page
The Error page template is rendered when a there is an error or when the requested page doesn't exist.
Available properties
You can use the following properties in the Error page template.
Name | Type | Description |
---|---|---|
error | string | The error type |
status_code | integer | The error status code |
promoted_articles | array | An array of promoted article objects |
ticket_forms | array | An array of ticket form objects |
help_center | object | A help_center object that holds information and settings about the current help center |
settings | object | A settings object with custom settings for the current theme |
signed_in | boolean | Whether the user is logged in or not |
featured_posts | array | An array of featured post objects |
brand | object | A brand object representing the current brand |
user | object | A user object representing the current user |
Possible errors and status codes:
Error | Status Code | Description |
---|---|---|
"unauthorized" | 401 | User has to be authenticated to proceed |
"forbidden" | 403 | User is not allowed to proceed |
"not_found" | others | Page doesn't exist or there was another problem |
Available helpers
You can use any built-in helpers, global helpers, or global advanced helpers in this page template.
Example
<div class="error-page">
<h1>{{t 'oops'}}</h1>
{{#is error 'unauthorized'}}
<h2>{{link 'sign_in'}}</h2>
{{/is}}
{{#is error 'forbidden'}}
<h2>{{t 'not_authorized'}}</h2>
{{/is}}
{{#is error 'not_found'}}
<h2>{{t 'nonexistent_page'}}</h2>
<p>{{t 'mistyped_address_or_moved_page'}}</p>
{{/is}}
{{#link 'help_center'}}
{{t 'back_to_homepage'}}
{{/link}}
</div>