enhance error messages

This commit is contained in:
2023-12-13 19:17:18 -07:00
parent 2b00b243e8
commit 5db3423301
2 changed files with 30 additions and 22 deletions

View File

@@ -328,16 +328,20 @@ export default class App extends Vue {
);
}
} catch (error) {
console.error("Got an error initializing notifications:", error);
this.$notify(
{
group: "alert",
type: "danger",
title: "Error Setting Notifications",
text: "Got an error setting notifications.",
},
-1,
);
if (window.location.host.startsWith("localhost")) {
console.log("Ignoring this error getting VAPID for local development:", error);
} else {
console.error("Got an error initializing notifications:", error);
this.$notify(
{
group: "alert",
type: "danger",
title: "Error Setting Notifications",
text: "Got an error setting notifications.",
},
-1,
);
}
}
}