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
@@ -53,7 +53,7 @@ async function onSubmit() {
else formError.value.generic = error.body ? error.body.message : 'Internal error';
busy.value = false;
return console.error(error);
if (error) return window.cloudron.onError(error);
}
}
@@ -116,7 +116,7 @@ async function onSubmit() {
if (error) {
formError.value.generic = error.body ? error.body.message : 'Internal error';
busy.value = false;
return console.error(error);
if (error) return window.cloudron.onError(error);
}
emit('success');
@@ -126,7 +126,7 @@ async function onSubmit() {
async function getMemory() {
const [error, result] = await systemModel.memory();
if (error) return console.error(error);
if (error) return window.cloudron.onError(error);
maxMemoryLimit.value = Math.ceil(result.memory / (1024*1024*1024)) * 1024 * 1024 * 1024;
}