/** {@inheritDoc } */ @Override public GitData retrieveGitData(String username) { GitData gitData = new GitData(); List<Repository> repositories; User user; try { RepositoryService repositoryService = new RepositoryService(); UserService userService = new UserService(); repositories = repositoryService.getRepositories(username); user = userService.getUser(username); prepareData(gitData, repositories, user); } catch (RequestException rq) { gitData.setInErrorState(true); gitData.setError("The user doesn't exist!"); LOG.debug("The user doesn't exist!"); } catch (IOException io) { gitData.setInErrorState(true); gitData.setError("Something went wrong while trying to interact with the GitHub service!"); LOG.debug("Something went wrong while trying to interact with the GitHub service!"); io.printStackTrace(); } return gitData; }