docs: @RequestMapping("VIEW")
      public String renderError(RenderRequest request, RenderResponse response, ModelMap model)
              throws Exception {
  
          HttpServletRequest httpRequest = this.portalRequestUtils.getPortletHttpRequest(request);
          IPortletWindowId currentFailedPortletWindowId =
                  (IPortletWindowId)
                          request.getAttribute(REQUEST_ATTRIBUTE__CURRENT_FAILED_PORTLET_WINDOW_ID);
          model.addAttribute("portletWindowId", currentFailedPortletWindowId);
          Exception cause =
                  (Exception) request.getAttribute(REQUEST_ATTRIBUTE__CURRENT_EXCEPTION_CAUSE);
          model.addAttribute("exception", cause);
          final String rootCauseMessage = ExceptionUtils.getRootCauseMessage(cause);
          model.addAttribute("rootCauseMessage", rootCauseMessage);
  
          // Maintenance Mode?
          if (cause != null && cause instanceof MaintenanceModeException) {
              return "/jsp/PortletError/maintenance";
          }
  
          IUserInstance userInstance = this.userInstanceManager.getUserInstance(httpRequest);
          if (hasAdminPrivileges(userInstance)) {
              IPortletWindow window =
                      this.portletWindowRegistry.getPortletWindow(
                              httpRequest, currentFailedPortletWindowId);
              window.setRenderParameters(new ParameterMap());
              IPortalUrlBuilder adminRetryUrl =
                      this.portalUrlProvider.getPortalUrlBuilderByPortletWindow(
                              httpRequest, currentFailedPortletWindowId, UrlType.RENDER);
              model.addAttribute("adminRetryUrl", adminRetryUrl.getUrlString());
  
              final IPortletWindow portletWindow =
                      portletWindowRegistry.getPortletWindow(
                              httpRequest, currentFailedPortletWindowId);
              final IPortletEntity parentPortletEntity = portletWindow.getPortletEntity();
              final IPortletDefinition parentPortletDefinition =
                      parentPortletEntity.getPortletDefinition();
              model.addAttribute("channelDefinition", parentPortletDefinition);
  
              StringWriter stackTraceWriter = new StringWriter();
              cause.printStackTrace(new PrintWriter(stackTraceWriter));
  
              model.addAttribute("stackTrace", stackTraceWriter.toString());
  
              return "/jsp/PortletError/detailed";
          }
          // no admin privileges, return generic view
          return "/jsp/PortletError/generic";
      }