From 1543aa451078ef0fb4bb4f9572883ff1a3f864c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 27 Sep 2019 10:05:54 +0200 Subject: [PATCH] Refactored error reporting --- .../NotificationMenu/NotificationMenu.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/webapp/components/notifications/NotificationMenu/NotificationMenu.vue b/webapp/components/notifications/NotificationMenu/NotificationMenu.vue index cf9cd4514..4708a687a 100644 --- a/webapp/components/notifications/NotificationMenu/NotificationMenu.vue +++ b/webapp/components/notifications/NotificationMenu/NotificationMenu.vue @@ -52,11 +52,7 @@ export default { if (this.updateOn) return this.updateOn = true - try { - this.$apollo.queries.notifications.refetch() - } catch (err) { - throw new Error(err) - } + this.$apollo.queries.notifications.refetch() }, async markAsRead(notificationSourceId) { const variables = { id: notificationSourceId } @@ -72,7 +68,7 @@ export default { return this.equalNotification(n, markAsRead) ? markAsRead : n }) } catch (err) { - throw new Error(err) + this.$toast.error(err.message) } }, hoverUpdate() { @@ -137,6 +133,9 @@ export default { this.updateOn = false return data.notifications }, + error(error) { + this.$toast.error(error) + }, }, }, }