1
0

feat: don't rethrow same error and handle errors globally

This commit is contained in:
Dominik Pschenitschni
2021-10-09 16:04:19 +02:00
parent 6f51921588
commit 3b940cb56c
71 changed files with 69 additions and 451 deletions

View File

@ -71,9 +71,6 @@ export default {
params: { listId: r.id },
})
})
.catch((e) => {
this.$message.error(e)
})
},
},
}

View File

@ -144,9 +144,6 @@ export default {
this.$store.dispatch(CURRENT_LIST, r)
this.setTitle(this.getListTitle(r))
})
.catch(e => {
this.$message.error(e)
})
.finally(() => {
this.listLoaded = this.$route.params.listId
})

View File

@ -42,9 +42,6 @@ export default {
this.$store.commit('namespaces/setListInNamespaceById', r)
this.$message.success({message: this.$t('list.archive.success')})
})
.catch(e => {
this.$message.error(e)
})
.finally(() => {
this.$router.back()
})

View File

@ -128,9 +128,6 @@ export default {
})
})
})
.catch(e => {
this.$message.error(e)
})
}, 300)
},
setBackground(backgroundId) {
@ -145,9 +142,6 @@ export default {
this.$store.commit('namespaces/setListInNamespaceById', l)
this.$message.success({message: this.$t('list.background.success')})
})
.catch(e => {
this.$message.error(e)
})
},
uploadBackground() {
if (this.$refs.backgroundUploadInput.files.length === 0) {
@ -160,9 +154,6 @@ export default {
this.$store.commit('namespaces/setListInNamespaceById', l)
this.$message.success({message: this.$t('list.background.success')})
})
.catch(e => {
this.$message.error(e)
})
},
removeBackground() {
this.listService.removeBackground(this.currentList)
@ -172,9 +163,6 @@ export default {
this.$message.success({message: this.$t('list.background.removeSuccess')})
this.$router.back()
})
.catch(e => {
this.$message.error(e)
})
},
},
}

View File

@ -30,9 +30,6 @@ export default {
this.$message.success({message: this.$t('list.delete.success')})
this.$router.push({name: 'home'})
})
.catch(e => {
this.$message.error(e)
})
},
},
}

View File

@ -50,9 +50,6 @@ export default {
this.$message.success({message: this.$t('list.duplicate.success')})
this.$router.push({name: 'list.index', params: {listId: r.list.id}})
})
.catch(e => {
this.$message.error(e)
})
},
},
}

View File

@ -101,9 +101,6 @@ export default {
.then(r => {
this.list = { ...r }
})
.catch(e => {
this.$message.error(e)
})
},
save() {
this.$store.dispatch('lists/updateList', this.list)
@ -113,9 +110,6 @@ export default {
this.$message.success({message: this.$t('list.edit.success')})
this.$router.back()
})
.catch(e => {
this.$message.error(e)
})
},
},
}

View File

@ -68,9 +68,6 @@ export default {
this.manageUsersComponent = 'userTeam'
this.setTitle(this.$t('list.share.title', {list: this.list.title}))
})
.catch(e => {
this.$message.error(e)
})
},
},
}

View File

@ -565,7 +565,6 @@ export default {
}
this.$store.dispatch('kanban/updateBucket', newBucket)
.then(() => this.$message.success({message: this.$t('list.kanban.doneBucketSavedSuccess')}))
.catch(e => this.$message.error(e))
},
collapseBucket(bucket) {
this.collapsedBuckets[bucket.id] = true

View File

@ -307,9 +307,6 @@ export default {
.then(r => {
this.tasks[e.newIndex] = r
})
.catch(e => {
this.$message.error(e)
})
},
},
}