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
@@ -52,7 +52,7 @@ async function refresh() {
if (error) {
if (error.status === 403) return window.location.hash = '/';
else if (error.status === 404) return window.location.hash = '/apps';
return console.error(error);
if (error) return window.cloudron.onError(error);
}
// prevent users who have no acces to
@@ -174,7 +174,7 @@ async function onStartApp() {
const [error] = await appsModel.start(app.value.id);
if (error) {
toggleRunStateBusy.value = false;
return console.error(error);
if (error) return window.cloudron.onError(error);
}
setTimeout(() => toggleRunStateBusy.value = false, 3000);
@@ -186,7 +186,7 @@ async function onStopApp() {
const [error] = await appsModel.stop(app.value.id);
if (error) {
toggleRunStateBusy.value = false;
return console.error(error);
if (error) return window.cloudron.onError(error);
}
setTimeout(() => toggleRunStateBusy.value = false, 3000);