diff --git a/plugins/github/src/org/jetbrains/plugins/github/tasks/GithubRepository.java b/plugins/github/src/org/jetbrains/plugins/github/tasks/GithubRepository.java index 5b8990e081bc..f4e45544dd8e 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/tasks/GithubRepository.java +++ b/plugins/github/src/org/jetbrains/plugins/github/tasks/GithubRepository.java @@ -18,6 +18,9 @@ import icons.TasksIcons; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.github.api.GithubApiUtil; +import org.jetbrains.plugins.github.exceptions.GithubAuthenticationException; +import org.jetbrains.plugins.github.exceptions.GithubJsonException; +import org.jetbrains.plugins.github.exceptions.GithubStatusCodeException; import org.jetbrains.plugins.github.util.GithubAuthData; import org.jetbrains.plugins.github.util.GithubUtil; import org.jetbrains.plugins.github.api.GithubIssue; @@ -81,7 +84,18 @@ public class GithubRepository extends BaseRepositoryImpl { @Override public Task[] getIssues(@Nullable String query, int max, long since) throws Exception { - return getIssues(query); + try { + return getIssues(query); + } + catch (GithubAuthenticationException e) { + throw new Exception(e.getMessage(), e); + } + catch (GithubStatusCodeException e) { + throw new Exception(e.getMessage(), e); + } + catch (GithubJsonException e) { + throw new Exception("Bad response format", e); + } } @NotNull