Replace generic console.error handlers with window.cloudron.onError

This commit is contained in:
Johannes Zellner
2025-12-08 19:45:11 +01:00
parent fe73e76fe9
commit 7db5a48e35
90 changed files with 297 additions and 298 deletions
+3 -3
View File
@@ -65,7 +65,7 @@ const archives = ref([]);
async function refreshArchives() {
const [error, result] = await archivesModel.list();
if (error) return console.error(error);
if (error) return window.cloudron.onError(error);
// ensure we use the full api oprigin
result.forEach(a => {
@@ -89,7 +89,7 @@ async function onRemove(archive) {
if (!yes) return;
const [error] = await archivesModel.remove(archive.id);
if (error) return console.error(error);
if (error) return window.cloudron.onError(error);
await refreshArchives();
}
@@ -102,7 +102,7 @@ async function onRestore(archive) {
async function onDownloadConfig(archive) {
const [backupConfigError, backupConfig] = await backupSitesModel.generateBackupConfig(archive);
if (backupConfigError) return console.error(backupConfigError);
if (backupConfigError) return window.cloudron.onError(backupConfigError);
const filename = `${archive.appConfig.fqdn}-archive-config-${(new Date(archive.creationTime)).toISOString().split('T')[0]}.json`;
download(filename, JSON.stringify(backupConfig, null, 4));