Fix cloudFile account bootstrap

This commit is contained in:
Jordan Wages 2026-04-20 13:36:28 -05:00
commit 37561a6a18

View file

@ -14,7 +14,18 @@ export class CloudFileProvider {
async initialize() {
const accounts = await this.cloudFileApi.getAllAccounts();
await Promise.all(accounts.map(account => this.ensureAccount(account)));
await Promise.all(
accounts.map(async account => {
try {
await this.ensureAccount(account);
} catch (caughtError) {
logError("Failed to synchronize cloudFile account state", {
accountId: account.id,
error: caughtError instanceof Error ? caughtError.message : String(caughtError)
});
}
})
);
}
async ensureAccount(account) {
@ -24,7 +35,6 @@ export class CloudFileProvider {
await this.cloudFileApi.updateAccount(account.id, {
configured: isConfigured,
managementUrl: this.managementUrlFor(account.id),
name: config?.displayName || account.name || "PsiTransfer",
uploadSizeLimit: -1,
spaceRemaining: -1,
spaceUsed: -1