feat: don't rethrow same error and handle errors globally
This commit is contained in:
@ -226,9 +226,6 @@ export default {
|
||||
.then((r) => {
|
||||
this.linkShares = r
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
add(listId) {
|
||||
const newLinkShare = new LinkShareModel({
|
||||
@ -247,9 +244,6 @@ export default {
|
||||
this.$message.success({message: this.$t('list.share.links.createSuccess')})
|
||||
this.load(listId)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
remove(listId) {
|
||||
const linkshare = new LinkShareModel({
|
||||
@ -262,9 +256,6 @@ export default {
|
||||
this.$message.success({message: this.$t('list.share.links.deleteSuccess')})
|
||||
this.load(listId)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.showDeleteModal = false
|
||||
})
|
||||
|
@ -281,9 +281,6 @@ export default {
|
||||
this.selectedRight[s.id] = s.right,
|
||||
)
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
deleteSharable() {
|
||||
if (this.shareType === 'user') {
|
||||
@ -306,9 +303,6 @@ export default {
|
||||
}
|
||||
this.$message.success({message: this.$t('list.share.userTeam.removeSuccess', {type: this.shareTypeName, sharable: this.sharableName})})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
add(admin) {
|
||||
if (admin === null) {
|
||||
@ -331,9 +325,6 @@ export default {
|
||||
this.$message.success({message: this.$t('list.share.userTeam.addedSuccess', {type: this.shareTypeName})})
|
||||
this.load()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
toggleType(sharable) {
|
||||
if (
|
||||
@ -367,9 +358,6 @@ export default {
|
||||
}
|
||||
this.$message.success({message: this.$t('list.share.userTeam.updatedSuccess', {type: this.shareTypeName})})
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
find(query) {
|
||||
if (query === '') {
|
||||
@ -382,9 +370,6 @@ export default {
|
||||
.then((response) => {
|
||||
this.found = response
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
clearAll() {
|
||||
this.found = []
|
||||
|
Reference in New Issue
Block a user