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.
if (!isAuthor) {
response.addHeader("x-aem-error-pass", "true");// added when migrated to cloud
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
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.
Views
Replies
Total Likes
HI @GurjotSingh
Please check https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-is-not-catching...
Thanks @arunpatidar
Going through the details and will try this out. Will keep you posted.
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.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies