Apache Sling > Sling CMS > Administration > Error Pages
When a user encounters an error on a Sling CMS site, Sling CMS will attempt to provide a relevant error page by performing the following steps in order:
sling:Page
at /content/[SITE_GROUP]/[SITE_NAME]/errors/[STATUS_CODE]sling:Page
at /content/[SITE_GROUP]/[SITE_NAME]/errors/defaultsling:Page
at /content/sling-cms/errorhandling/[STATUS_CODE]sling:Page
at /content/sling-cms/errorhandling/defaultThis allows you to customize the response to an error while not providing too much information to your users. For example, if you provide the following structure:
/content /sites /mysite /error /403 /500 /default
A user who encounters an application error (status code 500) would see the content of 500, an unauthorized user would see 403 and all other users who encounter errors would see default.
To prevent the Sling CMS error handling page to be displayed on your site, you should specify at least a default error page for every site.
There are various reasons that a Sling CMS application server could become unavailable, and you do not want to leave users unsure what is going on.
To alleviate this issue you should provide error pages for HTTP Status codes 502-504. These pages cannot be derived from Sling CMS as they will be requested only when Sling CMS is unavailable or not responding as expected.
Instead, you can configure these pages to be ignored by mod_proxy and served directly from the Apache Web Server.
This takes a few steps:
The error pages should be static HTML, ideally with all CSS, images, etc inlined. You don't necessarily need to provide separate error pages for each status code.