feat: don't rethrow same error and handle errors globally
This commit is contained in:
@ -229,9 +229,6 @@ export default {
|
||||
this.title = this.$t('team.edit.title', {team: this.team.name})
|
||||
this.setTitle(this.title)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
save() {
|
||||
if (this.team.name === '') {
|
||||
@ -246,9 +243,6 @@ export default {
|
||||
this.team = response
|
||||
this.$message.success({message: this.$t('team.edit.success')})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
deleteTeam() {
|
||||
this.teamService
|
||||
@ -257,9 +251,6 @@ export default {
|
||||
this.$message.success({message: this.$t('team.edit.delete.success')})
|
||||
this.$router.push({name: 'teams.index'})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
deleteUser() {
|
||||
this.teamMemberService
|
||||
@ -268,9 +259,6 @@ export default {
|
||||
this.$message.success({message: this.$t('team.edit.deleteUser.success')})
|
||||
this.loadTeam()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.showUserDeleteModal = false
|
||||
})
|
||||
@ -286,9 +274,6 @@ export default {
|
||||
this.loadTeam()
|
||||
this.$message.success({message: this.$t('team.edit.userAddedSuccess')})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
toggleUserType(member) {
|
||||
member.admin = !member.admin
|
||||
@ -308,9 +293,6 @@ export default {
|
||||
this.$t('team.edit.madeMember'),
|
||||
})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
findUser(query) {
|
||||
if (query === '') {
|
||||
@ -323,9 +305,6 @@ export default {
|
||||
.then((response) => {
|
||||
this.foundUsers = response
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
clearAll() {
|
||||
this.foundUsers = []
|
||||
|
@ -48,9 +48,6 @@ export default {
|
||||
.then(response => {
|
||||
this.teams = response
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -65,9 +65,6 @@ export default {
|
||||
})
|
||||
this.$message.success({message: this.$t('team.create.success') })
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user