Skip to content

Commit 546eee4

Browse files
committed
Fix response handling in createSecondaryStagingStore method
1 parent df35e59 commit 546eee4

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

ui/src/views/infra/zone/ZoneWizardLaunchZone.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,13 +2196,11 @@ export default {
21962196
},
21972197
createSecondaryStagingStore (args) {
21982198
return new Promise((resolve, reject) => {
2199-
let message = ''
2200-
22012199
api('createSecondaryStagingStore', args).then(json => {
2202-
const result = json.addimagestoreresponse.secondarystorage
2200+
const result = json.createsecondarystagingstoreresponse.secondarystorage
22032201
resolve(result)
22042202
}).catch(error => {
2205-
message = error.response.headers['x-description']
2203+
const message = error?.response?.headers?.['x-description'] || error.message || error
22062204
reject(message)
22072205
})
22082206
})

0 commit comments

Comments
 (0)