protected ModelAndView doHandle()

in aws-codebuild-server/src/main/java/jetbrains/buildServer/aws/codebuild/CodeBuildListProjectsController.java [40:54]


  protected ModelAndView doHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response) throws Exception {
    final Map<String, String> params = gerParams(request);
    final Map<String, String> invalids = AWSCommonParams.validate(params, false);
    if (invalids.isEmpty()) {
      final Map<String, Object> model = new HashMap<>();
      try {
        model.put("projects", getProjects(params));
      } catch (Throwable e) {
        return handle("errors.jsp", Collections.<String, Object>singletonMap("invalids", Collections.singletonMap(CodeBuildConstants.PROJECT_NAME_PARAM, e.getMessage())));
      }
      return handle("projects.jsp", model);
    } else {
      return handle("errors.jsp", Collections.<String, Object>singletonMap("invalids", invalids)); // escaped in the jsp
    }
  }