Refactored error reporting

This commit is contained in:
Wolfgang Huß 2019-09-27 10:05:54 +02:00
parent 1f8cc9ef15
commit 1543aa4510

View File

@ -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)
},
},
},
}