nhat-phan / merge-request-integration

An Intellij IDE plugin which helps you manage Merge Request and do Code Review right in your IDE.
Other
176 stars 58 forks source link

Uncaught ProviderException when unauthorized #110

Closed MaDKaTZe closed 3 years ago

MaDKaTZe commented 4 years ago

It happens if the plugin is unable provide authorization data, for example, due to locked keyring. Stack trace is below:

net.ntworld.mergeRequestIntegration.provider.ProviderException: 401 Unauthorized
    at net.ntworld.mergeRequestIntegration.provider.gitlab.GitlabUserApi$me$response$1.invoke(GitlabUserApi.kt:18)
    at net.ntworld.mergeRequestIntegration.provider.gitlab.GitlabUserApi$me$response$1.invoke(GitlabUserApi.kt:11)
    at net.ntworld.foundation.internal.ServiceBusProcessResultImpl.ifError(ServiceBusProcessResultImpl.kt:18)
    at net.ntworld.mergeRequestIntegration.provider.gitlab.GitlabUserApi.me(GitlabUserApi.kt:17)
    at net.ntworld.mergeRequestIntegration.DefaultProviderStorage.register(DefaultProviderStorage.kt:41)
    at net.ntworld.mergeRequestIntegrationIde.task.RegisterProviderTask.run(RegisterProviderTask.kt:29)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:935)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:442)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
nhat-phan commented 3 years ago

Thank you for reporting, I don't want to catch any exceptions because the IDE already have exception handler which handle all exceptions and ensure the IDE still running