From 65642d998f6a22ccfb1aa21970c6df53526c6d9d Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Tue, 18 Feb 2014 12:56:22 +0400 Subject: [PATCH] IDEA-118305 github: try to fix GH:E specific bug --- .../jetbrains/plugins/github/api/GithubApiUtil.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/github/src/org/jetbrains/plugins/github/api/GithubApiUtil.java b/plugins/github/src/org/jetbrains/plugins/github/api/GithubApiUtil.java index f444e952d831..86a0ca0cf8bd 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/api/GithubApiUtil.java +++ b/plugins/github/src/org/jetbrains/plugins/github/api/GithubApiUtil.java @@ -520,8 +520,15 @@ public class GithubApiUtil { List repos = new ArrayList(); 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; }