Skip to content

Commit

Permalink
UOE-11317: Log new NBR if response rejected by DSA (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-saurabh-narkhede authored Oct 24, 2024
1 parent eb5ec27 commit 287067f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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
)

0 comments on commit 287067f

Please sign in to comment.