backups: make test config funcs return error
This commit is contained in:
@@ -1780,10 +1780,11 @@ async function importApp(app, data, auditSource) {
|
||||
error = checkAppState(app, exports.ISTATE_PENDING_IMPORT);
|
||||
if (error) throw error;
|
||||
|
||||
const testProviderConfig = util.promisify(backups.testProviderConfig);
|
||||
|
||||
// TODO: make this smarter to do a read-only test and check if the file exists in the storage backend
|
||||
if (backupConfig) await testProviderConfig(backupConfig);
|
||||
if (backupConfig) {
|
||||
error = await backups.testProviderConfig(backupConfig);
|
||||
if (error) throw error;
|
||||
}
|
||||
|
||||
if (backupConfig) {
|
||||
if ('password' in backupConfig) {
|
||||
|
||||
Reference in New Issue
Block a user