We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f9ce22 commit 278aaaaCopy full SHA for 278aaaa
src/modules/cos/index.ts
@@ -131,12 +131,13 @@ export default class Cos {
131
if (e.code === 'BucketAlreadyExists' || e.code === 'BucketAlreadyOwnedByYou') {
132
console.log(`Bucket ${inputs.bucket} already exist.`);
133
} else if (e.code === 'TooManyBuckets') {
134
- // TODO: 存储桶太多了,兼容特殊大账号情况,暂时不抛出错误
+ // 存储桶太多了,就先查看是否存在,如果不存在再抛出错误
135
const exist = await this.isBucketExist(inputs.bucket!);
136
if (exist) {
137
138
return true;
139
}
140
+ throw constructCosError(`API_COS_putBucket`, err);
141
} else {
142
// 失败重试 1 次,如果再次出错,正常处理
143
if (this.retryTimes < this.maxRetryTimes) {
0 commit comments