feat: don't rethrow same error and handle errors globally
This commit is contained in:
@ -77,9 +77,6 @@ export default {
|
||||
this.$message.success({message: this.$t('namespace.create.success') })
|
||||
this.$router.back()
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -40,9 +40,6 @@ export default {
|
||||
this.$store.commit('namespaces/setNamespaceById', r)
|
||||
this.$message.success({message: this.$t('namespace.archive.success')})
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.$router.back()
|
||||
})
|
||||
|
@ -41,9 +41,6 @@ export default {
|
||||
this.$message.success({message: this.$t('namespace.delete.success')})
|
||||
this.$router.push({name: 'home'})
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -112,9 +112,6 @@ export default {
|
||||
this.title = this.$t('namespace.edit.title', {namespace: r.title})
|
||||
this.setTitle(this.title)
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
save() {
|
||||
this.namespaceService.update(this.namespace)
|
||||
@ -124,9 +121,6 @@ export default {
|
||||
this.$message.success({message: this.$t('namespace.edit.success')})
|
||||
this.$router.back()
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -68,9 +68,6 @@ export default {
|
||||
this.title = this.$t('namespace.share.title', { namespace: this.namespace.title })
|
||||
this.setTitle(this.title)
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user