@Override
  public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {

    if (isInternalError(request, response)) {
      //invoke the ambari error handler
      ambariErrorHandler.handle(target, baseRequest, request, response);
    } else {
      //invoke the original errorhandler
      webAppErrorHandler.handle(target, baseRequest, request, response);
    }
  }
Wraps the given ErrorHandler to log the error stacks
ambari-server/src/main/java/org/apache/ambari/server/api/AmbariViewErrorHandlerProxy.java