History

api: BucketNotification should disallow duplicate notification. (#2539)

Added checks to look for duplicated notification configs. Fixes #2472

Harshavardhana committed 10 years ago

Commit ec4260d1 parent c39d3db6 files · +113 −43Browse files

Showing the changes to cmd/api-errors.go (1 of 6 files). Show all

Unified · Split

cmd/api-errors.go+6−0
@@ -119,6 +119,7 @@ const ( · 118 unmodified lines
119119 ErrFilterNamePrefix
120120 ErrFilterNameSuffix
121121 ErrFilterValueInvalid
122+ ErrOverlappingConfigs
122123
123124 // S3 extended errors.
124125 ErrContentSHA256Mismatch
@@ -505,6 +506,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{ · 380 unmodified lines
505506 Description: "Size of filter rule value cannot exceed 1024 bytes in UTF-8 representation",
506507 HTTPStatusCode: http.StatusBadRequest,
507508 },
509+ ErrOverlappingConfigs: {
510+ Code: "InvalidArgument",
511+ Description: "Configurations overlap. Configurations on the same bucket cannot share a common event type.",
512+ HTTPStatusCode: http.StatusBadRequest,
513+ },
508514
509515 /// S3 extensions.
510516 ErrContentSHA256Mismatch: {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t