backups: make test config funcs return error

This commit is contained in:
Girish Ramakrishnan
2021-09-17 10:11:28 -07:00
parent 2554c47632
commit e8aaad976b
4 changed files with 28 additions and 27 deletions

View File

@@ -202,7 +202,7 @@ async function restore(backupConfig, backupId, version, sysinfoConfig, options,
await safe(mounts.tryAddMount(newMount, { timeout: 10 })); // 10 seconds
}
let [error] = await safe(util.promisify(backups.testProviderConfig)(backupConfig));
let error = await backups.testProviderConfig(backupConfig);
if (error) throw error;
if ('password' in backupConfig) {