diff --git a/xmcl-runtime/user/accountSystems/YggdrasilAccountSystem.ts b/xmcl-runtime/user/accountSystems/YggdrasilAccountSystem.ts index 0926c6963..d41344c6f 100644 --- a/xmcl-runtime/user/accountSystems/YggdrasilAccountSystem.ts +++ b/xmcl-runtime/user/accountSystems/YggdrasilAccountSystem.ts @@ -104,6 +104,8 @@ export class YggdrasilAccountSystem implements UserAccountSystem { } else if (e.error === 'ForbiddenOperationException' && e.errorMessage === 'Invalid credential information.') { throw new UserException({ type: 'loginInvalidCredentials' }, e.message || e.errorMessage, { cause: e }) + } else if (e.error === 'ForbiddenOperationException') { + throw new UserException({ type: 'loginGeneral' }, e.message || e.errorMessage, { cause: e }) } else if (e.error === 'IllegalArgumentException') { throw new UserException({ type: 'loginInvalidCredentials' }, e.message || e.errorMessage, { cause: e }) } else if (isSystemError(e)) { diff --git a/xmcl-runtime/version/VersionService.ts b/xmcl-runtime/version/VersionService.ts index 753e8adde..db832aac9 100644 --- a/xmcl-runtime/version/VersionService.ts +++ b/xmcl-runtime/version/VersionService.ts @@ -233,7 +233,10 @@ export class VersionService extends StatefulService implements IV const hashIndexPath = this.getPath('assets', 'indexes', `${version.assetIndex.sha1}.json`) missing(hashIndexPath).then(isMissing => { if (isMissing) { - return linkOrCopyFile(assetIndexPath, hashIndexPath) + return linkOrCopyFile(assetIndexPath, hashIndexPath).catch((e) => { + this.warn(`Failed to link asset index ${version.assetIndex?.id} to ${version.assetIndex?.sha1}.json`) + this.warn(e) + }) } }) }