Skip to content

Commit

Permalink
Do not return a request in buildRequests on error
Browse files Browse the repository at this point in the history
In some cases, the buildCdbRequest function might return a falsy value,
in case of error in creating the request or if we know in advance that
this request will return a no-bid.

In this case, the buildRequests() method should not return a request,
causing a no-bid.
  • Loading branch information
Spark-NF committed Apr 19, 2018
1 parent b783434 commit 8d222b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export const spec = {
data = buildCdbRequest(context, bidRequests);
}

return { method: 'POST', url, data, bidRequests };
if (data) {
return { method: 'POST', url, data, bidRequests };
}
},

/**
Expand Down

0 comments on commit 8d222b5

Please sign in to comment.