feat: don't rethrow same error and handle errors globally
This commit is contained in:
@ -71,9 +71,6 @@ export default {
|
||||
params: { listId: r.id },
|
||||
})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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
|
||||
})
|
||||
|
@ -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()
|
||||
})
|
||||
|
@ -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)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -307,9 +307,6 @@ export default {
|
||||
.then(r => {
|
||||
this.tasks[e.newIndex] = r
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user