Open HitmanInWis opened 2 weeks ago
For those looking for a workaround, updating my default.jsp
to the following code seems to resolve:
Integer statusCode = (Integer) request.getAttribute(SlingConstants.ERROR_STATUS);
if (statusCode == null) { statusCode = SlingHttpServletResponse.SC_INTERNAL_SERVER_ERROR; }
WCMMode wcmMode = WCMMode.fromRequest(request);
if (statusCode < SlingHttpServletResponse.SC_INTERNAL_SERVER_ERROR || wcmMode == WCMMode.DISABLED || wcmMode == WCMMode.PREVIEW) {
%><cq:include script="/apps/acs-commons/components/utilities/errorpagehandler/default.jsp" /><%
} else {
%><cq:include script="/libs/sling/servlet/errorhandler/default.jsp" /><%
}
Basically just capturing the case that the ACS Commons handler is doing the return
that prevents use of the OOTB libs default.jsp
and including it myself.
Required Information
Expected Behavior
When in author EDIT mode, the ACS AEM Commons error handler is supposed to let the default AEM handler render internal server errors. See the following code from
default.jsp
:Actual Behavior
Because there is a
return;
in theelse
statement, the default error handling from/libs/sling/servlet/errorhandler/default.jsp
is never reached, resulting in the end user getting a blank page on exception in Edit/Design mode. Removing thereturn;
restores the expected behavior, with the exception stack trace printing to the window.Steps to Reproduce
Implement the ACS AEM Commons error handling feature per instructions at https://adobe-consulting-services.github.io/acs-aem-commons/features/error-handler/index.html and trigger a RuntimeException for a server request while in author EDIT mode.