Skip to content

Commit b54af0c

Browse files
committed
fix(cos): remove bucket exist error
1 parent c480246 commit b54af0c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/modules/cos/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ export default class Cos {
143143
} catch (err) {
144144
const e = convertCosError(err);
145145
if (e.code === 'BucketAlreadyExists' || e.code === 'BucketAlreadyOwnedByYou') {
146-
if (!inputs.force) {
147-
throw constructCosError(`API_COS_putBucket`, err);
148-
} else {
149-
console.log(`Bucket ${inputs.bucket} already exist.`);
150-
}
146+
console.log(`Bucket ${inputs.bucket} already exist.`);
151147
} else {
152148
// 失败重试 1 次,如果再次出错,正常处理
153149
if (this.retryTimes < this.maxRetryTimes) {

0 commit comments

Comments
 (0)