File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,8 @@ const handleSave = async () => {
304304
305305 const targetResponse = await setRemoteReplicationTarget (props .bucketName , config )
306306 if (! targetResponse ) {
307- throw new Error (' Failed to create replication target' )
307+ // throw new Error('Failed to create replication target')
308+ return
308309 }
309310
310311 let oldConfig: any = null
Original file line number Diff line number Diff line change @@ -177,7 +177,16 @@ const handleRowDelete = async (rule: ReplicationRule) => {
177177 await deleteBucketReplication (bucketName .value as string )
178178 await deleteRemoteReplicationTarget (bucketName .value as string , rule .Destination ?.Bucket ?? ' ' )
179179 } else {
180+ // 获取当前配置以获取 Role 字段
181+ const currentConfig = await getBucketReplication (bucketName .value as string )
182+ const role = currentConfig ?.ReplicationConfiguration ?.Role
183+
184+ if (! role ) {
185+ throw new Error (' Replication configuration Role is missing' )
186+ }
187+
180188 await putBucketReplication (bucketName .value as string , {
189+ Role: role ,
181190 Rules: remaining ,
182191 })
183192 }
You can’t perform that action at this time.
0 commit comments