[github] Pass correct exception from PR list loader

Issue: IDEA-206881
This commit is contained in:
Ivan Semenov
2019-03-11 19:45:54 +03:00
parent e29c3767d3
commit c8e2dd78b4
@@ -26,6 +26,7 @@ import org.jetbrains.plugins.github.util.GithubAsyncUtil
import org.jetbrains.plugins.github.util.NonReusableEmptyProgressIndicator
import org.jetbrains.plugins.github.util.handleOnEdt
import java.util.concurrent.CompletableFuture
import java.util.concurrent.CompletionException
import java.util.concurrent.ScheduledFuture
import java.util.concurrent.TimeUnit
import javax.swing.ListModel
@@ -94,7 +95,7 @@ internal class GithubPullRequestsListLoaderImpl(private val progressManager: Pro
if (indicator.isCanceled) return@handleOnEdt
when {
error != null && !GithubAsyncUtil.isCancellation(error) -> {
this.error = error
this.error = if (error is CompletionException) error.cause!! else error
}
responsePage != null -> {
listModelDelegate.add(responsePage.items)