Show generic app install errors in the dialog

This commit is contained in:
Johannes Zellner
2025-03-21 10:55:55 +01:00
parent 30f3a6f450
commit c517b6db3b
2 changed files with 14 additions and 14 deletions
+4 -7
View File
@@ -176,19 +176,16 @@ function create() {
backupId: config.backupId // when restoring from archive
};
let error, result;
let result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/apps`, data, { access_token: accessToken });
} catch (e) {
error = e;
return [e];
}
if (error || result.status !== 202) {
console.error('Failed to install app.', error || result.status);
return error || result.body;
}
if (result.status !== 202) return [result];
return '';
return [null];
},
async list() {
let error, result;