From e75b8148ab5da114fa950e3512b42c2b67b1590b Mon Sep 17 00:00:00 2001 From: John Murret Date: Tue, 13 Aug 2024 14:18:55 -0600 Subject: [PATCH] adding missing erro --- agent/structs/errors.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/structs/errors.go b/agent/structs/errors.go index b92731770c85..9b62de648d8e 100644 --- a/agent/structs/errors.go +++ b/agent/structs/errors.go @@ -24,6 +24,7 @@ const ( errNotPrimaryDatacenter = "not the primary datacenter" errStateReadOnly = "CA Provider State is read-only" errUsingV2CatalogExperiment = "V1 catalog is disabled when V2 is enabled" + errSamenessGroupNotFound = "Sameness Group not found" errSamenessGroupMustBeDefaultForFailover = "Sameness Group must have DefaultForFailover set to true in order to use this endpoint" ) @@ -42,6 +43,7 @@ var ( ErrNotPrimaryDatacenter = errors.New(errNotPrimaryDatacenter) ErrStateReadOnly = errors.New(errStateReadOnly) ErrUsingV2CatalogExperiment = errors.New(errUsingV2CatalogExperiment) + ErrSamenessGroupNotFound = errors.New(errSamenessGroupNotFound) ErrSamenessGroupMustBeDefaultForFailover = errors.New(errSamenessGroupMustBeDefaultForFailover) ) @@ -65,6 +67,10 @@ func IsErrUsingV2CatalogExperiment(err error) bool { return err != nil && strings.Contains(err.Error(), errUsingV2CatalogExperiment) } +func IsErrSamenessGroupNotFound(err error) bool { + return err != nil && strings.Contains(err.Error(), errSamenessGroupNotFound) +} + func IsErrSamenessGroupMustBeDefaultForFailover(err error) bool { return err != nil && strings.Contains(err.Error(), errSamenessGroupMustBeDefaultForFailover) }