diff --git a/adapters/adhese/adhese.go b/adapters/adhese/adhese.go index 56d60be2505..29c21ef3b99 100644 --- a/adapters/adhese/adhese.go +++ b/adapters/adhese/adhese.go @@ -141,6 +141,9 @@ func (a *AdheseAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalR return nil, []error{err, WrapServerError(fmt.Sprintf("Response %v could not be parsed as generic Adhese bid.", string(response.Body)))} } + if len(adheseBidResponseArray) == 0 { + return nil, nil + } var adheseBid = adheseBidResponseArray[0] if adheseBid.Origin == "JERLICIA" { diff --git a/adapters/adhese/adhesetest/supplemental/res-no_bids_200.json b/adapters/adhese/adhesetest/supplemental/res-no_bids_200.json new file mode 100644 index 00000000000..2a778bdf0b4 --- /dev/null +++ b/adapters/adhese/adhesetest/supplemental/res-no_bids_200.json @@ -0,0 +1,54 @@ +{ + "mockBidRequest": { + "id": "test-req", + "user": { + "ext": { + "consent" : "dummy" + } + }, + "imp": [ + { + "id": "test-req", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + } + ] + }, + "ext": { + "bidder": { + "account": "demo", + "location": "_adhese_prebid_demo_", + "format": "leaderboard", + "targets": + { + "ci": ["gent", "brussels"], + "ag": ["55"], + "tl": ["all"] + } + } + } + } + ], + "site": { + "id": "test", + "publisher": { + "id": "123" + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads-demo.adhese.com/json/sl_adhese_prebid_demo_-leaderboard/ag55/cigent;brussels/tlall/xtdummy" + }, + "mockResponse": { + "status": 200, + "body": [] + } + } + ], + "expectedBidResponses": [] +} \ No newline at end of file diff --git a/adapters/adhese/adhesetest/supplemental/res-no_bids.json b/adapters/adhese/adhesetest/supplemental/res-no_bids_204.json similarity index 100% rename from adapters/adhese/adhesetest/supplemental/res-no_bids.json rename to adapters/adhese/adhesetest/supplemental/res-no_bids_204.json