Expand my Community achievements bar.

AEM as Cloud | Custom 500 error page implementation


Level 1

In AEM as Cloud, we implemented custom 500.jsp for 500 error redirection following approach #1 mentioned here.

We are able to see the plain text added on 500.jsp but facing below issues for customizing the page - 

1. Unable to call/load another AEM page from inside of 500.jsp to fetch all the content and front-end. Our purpose is to utilize the existing 500 AEM page for look and feel.

2. Document status code is showing 200 after this implementation.


ErrorDocument 404 /en-us/404-page-path.html
ErrorDocument 500 /en-us/500-page-path.html


function redirectOnError(){
.addHeader("x-aem-error-pass", "true");
throw (new Exception("custom500 called")); // explicitly throwing for 500 testing

Kindly guide for any fixes or updates that we can do to rectify 500.jsp issue. Attached is the reference file for 500.jsp




Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply