refactor: output errors on devtools (#928)

This commit is contained in:
三咲智子 Kevin Deng 2023-01-12 13:39:22 +08:00 committed by GitHub
parent 50c54144e6
commit 4e0777d723
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 34 additions and 16 deletions

View file

@ -49,7 +49,10 @@ const saveSettings = async () => {
try {
const subscription = await updateSubscription()
}
catch (err) {
// todo: handle error
console.error(err)
}
finally {
busy = false
@ -72,7 +75,8 @@ const doSubscribe = async () => {
showSubscribeError = true
}
}
catch {
catch (err) {
console.error(err)
subscribeError = t('settings.notifications.push_notifications.subscription_error.request_error')
showSubscribeError = true
}
@ -91,6 +95,9 @@ const removeSubscription = async () => {
try {
await unsubscribe()
}
catch (err) {
console.error(err)
}
finally {
busy = false
animateRemoveSubscription = false