Skip to content

Commit

Permalink
Remove panic case
Browse files Browse the repository at this point in the history
  • Loading branch information
AvinashKapre committed Apr 26, 2024
1 parent 8b12b65 commit 806deb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion endpoints/openrtb2/auction_ow.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func UpdateResponseExtOW(w http.ResponseWriter, bidResponse *openrtb2.BidRespons
} else if rCtx.Endpoint == models.EndpointAppLovinMax {
bidResponse.Ext = nil
if rCtx.AppLovinMax.Reject {
*bidResponse = openrtb2.BidResponse{}
w.WriteHeader(http.StatusNoContent)
}
}
Expand Down
17 changes: 16 additions & 1 deletion endpoints/openrtb2/auction_ow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,22 @@ func TestUpdateResponseExtOW(t *testing.T) {
},
},
rejectResponse: true,
want: &openrtb2.BidResponse{},
want: &openrtb2.BidResponse{
ID: "123",
BidID: "bid-id-1",
Cur: "USD",
SeatBid: []openrtb2.SeatBid{
{
Seat: "pubmatic",
Bid: []openrtb2.Bid{
{
ID: "bid-id-1",
ImpID: "imp_1",
},
},
},
},
},
RestoredResponse: &openrtb2.BidResponse{
ID: "123",
BidID: "bid-id-1",
Expand Down

0 comments on commit 806deb9

Please sign in to comment.