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

fix log message not displaying when referencing missing bidder #1737

Merged
merged 3 commits into from
Oct 23, 2017
Merged
Changes from 1 commit
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
14 changes: 6 additions & 8 deletions src/adaptermanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,18 @@ exports.callBids = ({adUnits, cbTimeout}) => {
$$PREBID_GLOBAL$$._bidsRequested.push(bidderRequest);
_bidderRequests.push(bidderRequest);
}
} else {
utils.logError(`Adapter trying to be called which does not exist: ${bidRequest.bidderCode} adaptermanager.callBids`);
}
});

_bidderRequests.forEach(bidRequest => {
bidRequest.start = new Date().getTime();
const adapter = _bidderRegistry[bidRequest.bidderCode];
if (adapter) {
if (bidRequest.bids && bidRequest.bids.length !== 0) {
utils.logMessage(`CALLING BIDDER ======= ${bidRequest.bidderCode}`);
events.emit(CONSTANTS.EVENTS.BID_REQUESTED, bidRequest);
adapter.callBids(bidRequest);
}
} else {
utils.logError(`Adapter trying to be called which does not exist: ${bidRequest.bidderCode} adaptermanager.callBids`);
if (bidRequest.bids && bidRequest.bids.length !== 0) {
utils.logMessage(`CALLING BIDDER ======= ${bidRequest.bidderCode}`);
events.emit(CONSTANTS.EVENTS.BID_REQUESTED, bidRequest);
adapter.callBids(bidRequest);
}
})
};
Expand Down