Revert "Replace generic console.error handlers with window.cloudron.onError"
This reverts commit 7db5a48e35.
This commit is contained in:
@@ -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';
|
||||
if (error) return window.cloudron.onError(error);
|
||||
return console.error(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;
|
||||
if (error) return window.cloudron.onError(error);
|
||||
return console.error(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;
|
||||
if (error) return window.cloudron.onError(error);
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
setTimeout(() => toggleRunStateBusy.value = false, 3000);
|
||||
|
||||
Reference in New Issue
Block a user