Alerting: Return proper status code when trying to create alert notification channel with duplicate name or uid (#28043)

* Alerting: Return proper status code when trying to create an Alert Notification where the name or UID already exists.

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
jgulick48
2020-10-20 13:53:48 +02:00
committed by GitHub
co-authored by Arve Knudsen
parent d13c6b4c5a
commit 5bc6c447e3
3 changed files with 8 additions and 2 deletions
+2
View File
@@ -15,6 +15,8 @@ var (
ErrAlertNotificationStateVersionConflict = errors.New("alert notification state update version conflict")
ErrAlertNotificationStateAlreadyExist = errors.New("alert notification state already exists")
ErrAlertNotificationFailedGenerateUniqueUid = errors.New("Failed to generate unique alert notification uid")
ErrAlertNotificationWithSameNameExists = errors.New("alert notification with same name already exists")
ErrAlertNotificationWithSameUIDExists = errors.New("alert notification with same uid already exists")
)
type AlertNotificationStateType string