Clear all saved accounts regardless of failure (#10107)

This commit is contained in:
Amir Omidi
2020-04-21 13:56:04 -07:00
committed by GitHub
parent 8e63ca8d0a
commit 283c851494

View File

@@ -279,11 +279,15 @@ export class AccountManagementService implements IAccountManagementService {
let finalResult = true; let finalResult = true;
for (const account of accounts) { for (const account of accounts) {
try {
const removeResult = await this.removeAccount(account.key); const removeResult = await this.removeAccount(account.key);
if (removeResult === false) { if (removeResult === false) {
this._logService.info('Error when removing %s.', account.key); this._logService.info('Error when removing %s.', account.key);
finalResult = false; finalResult = false;
} }
} catch (ex) {
this._logService.error('Error when removing an account %s. Exception: %s', account.key, JSON.stringify(ex));
}
} }
return finalResult; return finalResult;
} }