Skip to content

Commit c36d973

Browse files
committed
pass error from UI to API
1 parent 7042cfb commit c36d973

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ui/src/views/network/VpcTab.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,12 +795,12 @@ export default {
795795
796796
this.formRef.value.validate().then(() => {
797797
const values = toRaw(this.form)
798-
799-
api('createVpnConnection', {
800-
s2svpngatewayid: this.vpnGateways[0].id,
798+
const params = {
799+
s2svpngatewayid: this.vpnGateways[0] ? this.vpnGateways[0].id : null,
801800
s2scustomergatewayid: values.vpncustomergateway,
802801
passive: values.passive ? values.passive : false
803-
}).then(response => {
802+
}
803+
api('createVpnConnection', params).then(response => {
804804
this.$pollJob({
805805
jobId: response.createvpnconnectionresponse.jobid,
806806
title: this.$t('label.vpn.connection'),

0 commit comments

Comments
 (0)