Added checks to look for duplicated notification configs. Fixes #2472
Showing the changes to cmd/api-errors.go (1 of 6 files). Show all
Unified · Split
| @@ -119,6 +119,7 @@ const ( · 118 unmodified lines | ||
| 119 | 119 | ErrFilterNamePrefix |
| 120 | 120 | ErrFilterNameSuffix |
| 121 | 121 | ErrFilterValueInvalid |
| 122 | + ErrOverlappingConfigs | |
| 122 | 123 | |
| 123 | 124 | // S3 extended errors. |
| 124 | 125 | ErrContentSHA256Mismatch |
| @@ -505,6 +506,11 @@ var errorCodeResponse = map[APIErrorCode]APIError{ · 380 unmodified lines | ||
| 505 | 506 | Description: "Size of filter rule value cannot exceed 1024 bytes in UTF-8 representation", |
| 506 | 507 | HTTPStatusCode: http.StatusBadRequest, |
| 507 | 508 | }, |
| 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 | + }, | |
| 508 | 514 | |
| 509 | 515 | /// S3 extensions. |
| 510 | 516 | ErrContentSHA256Mismatch: { |