Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UOE-11317: Log new NBR if response rejected by DSA #950

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"strings"
"time"

"github.com/prebid/prebid-server/v2/modules/pubmatic/openwrap/models/nbr"
"github.com/prebid/prebid-server/v2/modules/pubmatic/openwrap/utils"
"github.com/prebid/prebid-server/v2/privacy"

Expand Down Expand Up @@ -1415,7 +1416,7 @@ func (e *exchange) makeBid(bids []*entities.PbsOrtbBid, auc *auction, returnCrea
}
bidResponseExt.Warnings[adapter] = append(bidResponseExt.Warnings[adapter], dsaMessage)
nonBidParams := entities.GetNonBidParamsFromPbsOrtbBid(bid, adapter.String())
nonBidParams.NonBidReason = int(ResponseRejectedGeneral)
nonBidParams.NonBidReason = int(nbr.ResponseRejectedDSA)
seatNonBids.AddBid(openrtb_ext.NewNonBid(nonBidParams), adapter.String())
continue // Don't add bid to result
}
Expand Down
2 changes: 1 addition & 1 deletion exchange/exchange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4972,7 +4972,7 @@ func TestMakeBidWithValidation(t *testing.T) {
seatNonBid := openrtb_ext.NonBidCollection{}
nonBid := openrtb_ext.NewNonBid(openrtb_ext.NonBidParams{
Bid: &openrtb2.Bid{},
NonBidReason: 300,
NonBidReason: 620,
BidMeta: &openrtb_ext.ExtBidPrebidMeta{
AdapterCode: "pubmatic",
},
Expand Down
1 change: 1 addition & 0 deletions modules/pubmatic/openwrap/models/nbr/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ const (
InvalidRedirectURL openrtb3.NoBidReason = 617
InvalidResponseFormat openrtb3.NoBidReason = 618
MissingOWRedirectURL openrtb3.NoBidReason = 619
ResponseRejectedDSA openrtb3.NoBidReason = 620 // Response Rejected - DSA
)
Loading