From c6d8af71e6006b933243886c0e5d14c5e32963bc Mon Sep 17 00:00:00 2001 From: bsardo <1168933+bsardo@users.noreply.github.com> Date: Wed, 18 Feb 2026 22:34:12 -0500 Subject: [PATCH] Adjust white label only error messages --- config/bidderinfo.go | 6 +++--- config/bidderinfo_test.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/bidderinfo.go b/config/bidderinfo.go index d3873bf2e94..6adb2d2a07e 100644 --- a/config/bidderinfo.go +++ b/config/bidderinfo.go @@ -464,17 +464,17 @@ func validateAliases(aliasBidderInfo BidderInfo, infos BidderInfos, bidderName s } if aliasBidderInfo.WhiteLabelOnly { - return fmt.Errorf("bidder: %s is an alias and cannot be set as white label only", bidderName) + return fmt.Errorf("bidder '%s' is an alias and cannot be set as white label only", bidderName) } parentBidder, parentBidderFound := infos[aliasBidderInfo.AliasOf] if !parentBidderFound { - return fmt.Errorf("bidder: %s not found for an alias: %s", aliasBidderInfo.AliasOf, bidderName) + return fmt.Errorf("alias '%s' references a nonexistent bidder '%s'", bidderName, aliasBidderInfo.AliasOf) } if len(parentBidder.AliasOf) > 0 { - return fmt.Errorf("bidder: %s cannot be an alias of an alias: %s", aliasBidderInfo.AliasOf, bidderName) + return fmt.Errorf("alias '%s' cannot reference another alias '%s'", bidderName, aliasBidderInfo.AliasOf) } return nil diff --git a/config/bidderinfo_test.go b/config/bidderinfo_test.go index 8c251842c71..785b85bc6e7 100644 --- a/config/bidderinfo_test.go +++ b/config/bidderinfo_test.go @@ -516,7 +516,7 @@ func TestProcessAliasBidderInfo(t *testing.T) { AliasOf: "bidderA", }, }, - expectedErr: errors.New("bidder: bidderA not found for an alias: bidderB"), + expectedErr: errors.New("alias 'bidderB' references a nonexistent bidder 'bidderA'"), }, { description: "bidder info not found for an alias", @@ -698,21 +698,21 @@ func TestValidateAliases(t *testing.T) { bidderName: "b", bidderInfo: BidderInfo{AliasOf: "nonexistent"}, bidderInfos: BidderInfos{}, - expectedErr: errors.New("bidder: nonexistent not found for an alias: b"), // does this make sense? should it be reversed? + expectedErr: errors.New("alias 'b' references a nonexistent bidder 'nonexistent'"), }, { name: "alias-of-alias", bidderName: "b", bidderInfo: BidderInfo{AliasOf: "a"}, bidderInfos: BidderInfos{"a": BidderInfo{AliasOf: "foo"}}, - expectedErr: errors.New("bidder: a cannot be an alias of an alias: b"), // does this make sense? should it be reversed? + expectedErr: errors.New("alias 'b' cannot reference another alias 'a'"), }, { name: "whitelabelonly", bidderName: "b", bidderInfo: BidderInfo{AliasOf: "a", WhiteLabelOnly: true}, bidderInfos: BidderInfos{"a": BidderInfo{}}, - expectedErr: errors.New("bidder: b is an alias and cannot be set as white label only"), + expectedErr: errors.New("bidder 'b' is an alias and cannot be set as white label only"), }, }