@Override
protected void fail(Throwable cause) {
if(cause instanceof NoSuchProjectException) {
assert issuesContainer instanceof SonarQube;
SonarQube sonarQube=(SonarQube) issuesContainer;
if(getUserCredentials()!= null) {
AuthenticationRepository.getInstance().saveAuthentication(sonarQube.getServerUrl(), null, getUserCredentials());
}
ProjectChooser chooser=new ProjectChooser(WindowManager.getDefault().getMainWindow(), true);
chooser.setSelectedUrl(sonarQube.getServerUrl());
chooser.setServerUrlEnabled(false);
chooser.loadProjectKeys();
if(chooser.showDialog() == ProjectChooser.Option.ACCEPT) {
ProjectContext newProjectContext = new ProjectContext(getProjectContext().getProject(), chooser.getSelectedProjectKey());
TaskExecutor.execute(new SummaryTask(issuesContainer, newProjectContext, filters));