WIP some work on making errors less spammy

This commit is contained in:
Henry Jameson 2021-03-08 22:24:39 +02:00
parent 2e7bd99444
commit 90afcd3420
4 changed files with 43 additions and 32 deletions

View file

@ -57,12 +57,14 @@ const fetchNotifications = ({ store, args, older }) => {
return notifications
})
.catch((error) => {
store.dispatch('pushGlobalNotice', {
level: 'error',
messageKey: 'notifications.error',
messageArgs: [error.message],
timeout: 5000
})
if (!store.rootState.api.connectionBroken) {
store.dispatch('pushGlobalNotice', {
level: 'error',
messageKey: 'notifications.error',
messageArgs: [error.message],
timeout: 5000
})
}
})
}

View file

@ -66,12 +66,14 @@ const fetchAndUpdate = ({
return { statuses, pagination }
})
.catch((error) => {
store.dispatch('pushGlobalNotice', {
level: 'error',
messageKey: 'timeline.error',
messageArgs: [error.message],
timeout: 5000
})
if (!store.rootState.api.connectionBroken) {
store.dispatch('pushGlobalNotice', {
level: 'error',
messageKey: 'timeline.error',
messageArgs: [error.message],
timeout: 5000
})
}
})
}