mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix: using correct response on get_bucket_lifecycle_configuration (#8962)
This commit is contained in:
parent
f749a9bf0e
commit
6b1f2fc133
@ -97,6 +97,7 @@ const (
|
|||||||
ErrNoSuchBucket
|
ErrNoSuchBucket
|
||||||
ErrNoSuchBucketPolicy
|
ErrNoSuchBucketPolicy
|
||||||
ErrNoSuchBucketLifecycle
|
ErrNoSuchBucketLifecycle
|
||||||
|
ErrNoSuchLifecycleConfiguration
|
||||||
ErrNoSuchBucketSSEConfig
|
ErrNoSuchBucketSSEConfig
|
||||||
ErrNoSuchKey
|
ErrNoSuchKey
|
||||||
ErrNoSuchUpload
|
ErrNoSuchUpload
|
||||||
@ -489,6 +490,11 @@ var errorCodes = errorCodeMap{
|
|||||||
Description: "The bucket lifecycle configuration does not exist",
|
Description: "The bucket lifecycle configuration does not exist",
|
||||||
HTTPStatusCode: http.StatusNotFound,
|
HTTPStatusCode: http.StatusNotFound,
|
||||||
},
|
},
|
||||||
|
ErrNoSuchLifecycleConfiguration: {
|
||||||
|
Code: "NoSuchLifecycleConfiguration",
|
||||||
|
Description: "The lifecycle configuration does not exist",
|
||||||
|
HTTPStatusCode: http.StatusNotFound,
|
||||||
|
},
|
||||||
ErrNoSuchBucketSSEConfig: {
|
ErrNoSuchBucketSSEConfig: {
|
||||||
Code: "ServerSideEncryptionConfigurationNotFoundError",
|
Code: "ServerSideEncryptionConfigurationNotFoundError",
|
||||||
Description: "The server side encryption configuration was not found",
|
Description: "The server side encryption configuration was not found",
|
||||||
@ -1725,7 +1731,7 @@ func toAPIErrorCode(ctx context.Context, err error) (apiErr APIErrorCode) {
|
|||||||
case BucketPolicyNotFound:
|
case BucketPolicyNotFound:
|
||||||
apiErr = ErrNoSuchBucketPolicy
|
apiErr = ErrNoSuchBucketPolicy
|
||||||
case BucketLifecycleNotFound:
|
case BucketLifecycleNotFound:
|
||||||
apiErr = ErrNoSuchBucketLifecycle
|
apiErr = ErrNoSuchLifecycleConfiguration
|
||||||
case BucketSSEConfigNotFound:
|
case BucketSSEConfigNotFound:
|
||||||
apiErr = ErrNoSuchBucketSSEConfig
|
apiErr = ErrNoSuchBucketSSEConfig
|
||||||
case *event.ErrInvalidEventName:
|
case *event.ErrInvalidEventName:
|
||||||
|
@ -346,7 +346,7 @@ func ErrorRespToObjectError(err error, params ...string) error {
|
|||||||
err = BucketNotEmpty{}
|
err = BucketNotEmpty{}
|
||||||
case "NoSuchBucketPolicy":
|
case "NoSuchBucketPolicy":
|
||||||
err = BucketPolicyNotFound{}
|
err = BucketPolicyNotFound{}
|
||||||
case "NoSuchBucketLifecycle":
|
case "NoSuchLifecycleConfiguration":
|
||||||
err = BucketLifecycleNotFound{}
|
err = BucketLifecycleNotFound{}
|
||||||
case "InvalidBucketName":
|
case "InvalidBucketName":
|
||||||
err = BucketNameInvalid{Bucket: bucket}
|
err = BucketNameInvalid{Bucket: bucket}
|
||||||
|
Loading…
Reference in New Issue
Block a user