mirror of
https://github.com/minio/minio.git
synced 2025-11-10 22:10:12 -05:00
api: BucketNotification should disallow duplicate notification. (#2539)
Added checks to look for duplicated notification configs. Fixes #2472
This commit is contained in:
@@ -119,6 +119,7 @@ const (
|
||||
ErrFilterNamePrefix
|
||||
ErrFilterNameSuffix
|
||||
ErrFilterValueInvalid
|
||||
ErrOverlappingConfigs
|
||||
|
||||
// S3 extended errors.
|
||||
ErrContentSHA256Mismatch
|
||||
@@ -505,6 +506,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{
|
||||
Description: "Size of filter rule value cannot exceed 1024 bytes in UTF-8 representation",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
ErrOverlappingConfigs: {
|
||||
Code: "InvalidArgument",
|
||||
Description: "Configurations overlap. Configurations on the same bucket cannot share a common event type.",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
},
|
||||
|
||||
/// S3 extensions.
|
||||
ErrContentSHA256Mismatch: {
|
||||
|
||||
Reference in New Issue
Block a user