mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Refactored error reporting
This commit is contained in:
parent
1f8cc9ef15
commit
1543aa4510
@ -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)
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user