refactor: output errors on devtools (#928)
This commit is contained in:
parent
50c54144e6
commit
4e0777d723
9 changed files with 34 additions and 16 deletions
|
@ -19,7 +19,8 @@ async function toggleFollow() {
|
|||
const newRel = await masto.v1.accounts[relationship!.following ? 'follow' : 'unfollow'](account.id)
|
||||
Object.assign(relationship!, newRel)
|
||||
}
|
||||
catch {
|
||||
catch (err) {
|
||||
console.error(err)
|
||||
// TODO error handling
|
||||
relationship!.following = !relationship!.following
|
||||
}
|
||||
|
@ -31,7 +32,8 @@ async function unblock() {
|
|||
const newRel = await masto.v1.accounts.unblock(account.id)
|
||||
Object.assign(relationship!, newRel)
|
||||
}
|
||||
catch {
|
||||
catch (err) {
|
||||
console.error(err)
|
||||
// TODO error handling
|
||||
relationship!.blocking = true
|
||||
}
|
||||
|
@ -43,7 +45,8 @@ async function unmute() {
|
|||
const newRel = await masto.v1.accounts.unmute(account.id)
|
||||
Object.assign(relationship!, newRel)
|
||||
}
|
||||
catch {
|
||||
catch (err) {
|
||||
console.error(err)
|
||||
// TODO error handling
|
||||
relationship!.muting = true
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -32,7 +32,9 @@ async function oauth() {
|
|||
},
|
||||
})
|
||||
}
|
||||
catch {
|
||||
catch (err) {
|
||||
console.error(err)
|
||||
|
||||
displayError = true
|
||||
error = true
|
||||
await nextTick()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue