Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit f366304

Browse files
davidjumaniustcweizhou
authored andcommitted
migratewizard: Display error and unfreeze form when api call fails (#912)
1 parent 4bb6e88 commit f366304

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/views/compute/MigrateWizard.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,13 @@ export default {
177177
})
178178
this.$parent.$parent.close()
179179
}).catch(error => {
180-
console.error(error)
181-
this.$message.error(`${this.$t('message.migrating.vm.to.host.failed')} ${this.selectedHost.name}`)
180+
this.$notification.error({
181+
message: this.$t('message.request.failed'),
182+
description: (error.response && error.response.headers && error.response.headers['x-description']) || error.message,
183+
duration: 0
184+
})
185+
}).finally(() => {
186+
this.loading = false
182187
})
183188
},
184189
handleChangePage (page, pageSize) {

0 commit comments

Comments
 (0)