File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,12 @@ class Postgresql {
47
47
// exist and public access config different, update db instance
48
48
if ( publicAccess !== extranetAccess ) {
49
49
console . log ( `DB instance ${ dBInstanceName } existed, updating...` ) ;
50
- dbDetail = await toggleDbInstanceAccess ( this . capi , dBInstanceName , extranetAccess ) ;
50
+ // do not throw error when open public access
51
+ try {
52
+ dbDetail = await toggleDbInstanceAccess ( this . capi , dBInstanceName , extranetAccess ) ;
53
+ } catch ( e ) {
54
+ console . log ( `Toggle DB Instane access failed, ${ e . message } , ${ e . reqId } ` ) ;
55
+ }
51
56
} else {
52
57
console . log ( `DB instance ${ dBInstanceName } existed.` ) ;
53
58
}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ function getDbExtranetAccess(netInfos) {
46
46
let result = false ;
47
47
netInfos . forEach ( ( item ) => {
48
48
if ( item . NetType === 'public' ) {
49
- result = item . Status === '1 ' ;
49
+ result = item . Status === 'opened ' ;
50
50
}
51
51
} ) ;
52
52
return result ;
You can’t perform that action at this time.
0 commit comments