IDEA-118305 github: try to fix GH:E specific bug

This commit is contained in:
Aleksey Pivovarov
2014-02-18 12:56:33 +04:00
parent ada3f5250f
commit 65642d998f
@@ -520,8 +520,15 @@ public class GithubApiUtil {
List<GithubRepo> repos = new ArrayList<GithubRepo>();
repos.addAll(getUserRepos(auth));
repos.addAll(getMembershipRepos(auth));
repos.addAll(getWatchedRepos(auth));
// We already can return something useful from getUserRepos, so let's ignore errors.
// One of this may not exist in GitHub enterprise
try {
repos.addAll(getMembershipRepos(auth));
} catch (GithubStatusCodeException ignore) {}
try {
repos.addAll(getWatchedRepos(auth));
} catch (GithubStatusCodeException ignore) {}
return repos;
}