Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

AEM as cloud 500 page redirection issue


Level 1

We recently migrated from AEM 6.5 to AEMasCloud and facing issue for 500 error page redirection. Our Solution is implemented as below and was working fine unless we switched to AEMasCloud.

1. In Dispatcher we have -

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

2. In AEM, we have a Component Model and sending error as depicted in below code. Requirement was to keep the URL same and display 500 page in case of any issue.

(!isAuthor) {
response.addHeader("x-aem-error-pass", "true");// added when migrated to cloud

We are unable to understand why in Cloud, it is not respecting the dispatcher code written to redirect on basis of 500 error similar to how it was working earlier. Requirement is to show internal server error without changing the current URL.


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

3 Replies


Level 1

Thanks @arunpatidar 

Going through the details and will try this out. Will keep you posted.


Level 1

Adding details for the community - 

As per logs analyzed, dispatcher is correctly 'trying' to load the 500 page internally. Whereas observed that somehow it is not  passing "x-aem-error-pass" in header. This one is necessary for the server to recognize the error page as per Adobe's documentation. 

We removed all the custom code and 500 error page and observed that OOB message was only coming as per image below-


Same is getting reproduces at Adobe's end and it being worked upon in backend.