diff options
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e57ae0ca..77b751bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed + +- Some classes of errors would be swallowed by an unhelpful 'Invalid remote: origin' message + ## [1.12.0] - 2020-09-24 ### Added diff --git a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt index b0aed087..36b8b6fb 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt @@ -128,11 +128,12 @@ abstract class BaseGitActivity : AppCompatActivity() { */ private fun rootCauseException(throwable: Throwable): Throwable { var rootCause = throwable - // JGit's TransportException hides the more helpful SSHJ exceptions. + // JGit's InvalidRemoteException and TransportException hide the more helpful SSHJ exceptions. // Also, SSHJ's UserAuthException about exhausting available authentication methods hides // more useful exceptions. while ((rootCause is org.eclipse.jgit.errors.TransportException || rootCause is org.eclipse.jgit.api.errors.TransportException || + rootCause is org.eclipse.jgit.api.errors.InvalidRemoteException || (rootCause is UserAuthException && rootCause.message == "Exhausted available authentication methods"))) { rootCause = rootCause.cause ?: break |