Skip to content

Commit 0ef0fe2

Browse files
authored
fix: add successStatus (#762)
1 parent 63f7d5a commit 0ef0fe2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/common/bucket/deleteBucketPolicy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ proto.deleteBucketPolicy = async function deleteBucketPolicy(bucketName, options
99
this._checkBucketName(bucketName);
1010

1111
const params = this._bucketRequestParams('DELETE', bucketName, 'policy', options);
12-
12+
params.successStatuses = [204];
1313
const result = await this.request(params);
1414

1515
return {

lib/common/bucket/getBucketPolicy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ proto.getBucketPolicy = async function getBucketPolicy(bucketName, options = {})
1111
const params = this._bucketRequestParams('GET', bucketName, 'policy', options);
1212

1313
const result = await this.request(params);
14-
14+
params.successStatuses = [200];
1515
let policy = null;
1616

1717
if (result.res.status === 200) {

lib/common/bucket/putBucketPolicy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ proto.putBucketPolicy = async function putBucketPolicy(bucketName, policy, optio
1818
}
1919
const params = this._bucketRequestParams('PUT', bucketName, 'policy', options);
2020
params.content = policy2Str(policy);
21-
21+
params.successStatuses = [200];
2222
const result = await this.request(params);
2323
return {
2424
status: result.status,

0 commit comments

Comments
 (0)