Skip to content

Fixing some recent bugs in addBidResponse#1372

Merged
mkendall07 merged 3 commits intomasterfrom
add-no-bid-check
Jul 13, 2017
Merged

Fixing some recent bugs in addBidResponse#1372
mkendall07 merged 3 commits intomasterfrom
add-no-bid-check

Conversation

@dbemiller
Copy link
Contributor

@dbemiller dbemiller commented Jul 12, 2017

Type of change

Bugfix

Description of change

Fixing some regressions introduced in #1277

  1. The old code allowed adapters to call addBidResponse without supplying a bid. This permissibility may or may not be a good idea... but Implementing prebid-cache to support Video ads #1277 definitely isn't a good place to make that change. The (!bid) check is added back in here.

  2. The bidAdustment event needs to be fired before the getPriceBucketStrings gets called, because listeners for that event may mutate the bid's cpm.

@dbemiller dbemiller mentioned this pull request Jul 12, 2017
8 tasks
matthewlane
matthewlane previously approved these changes Jul 12, 2017
@dbemiller dbemiller changed the title Add no bid check Fixing some recent bugs in addBidResponse Jul 13, 2017
}

if (!adUnitCode) {
utils.logWarn(errorMessage('No adUnitCode was supplied to addBidResponse.'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw if you put the bid check before the adUnitCode, you could still use errorMessage here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, these checks really shouldn't be necessary anyway once we have a proper adapter validator in place.

@mkendall07 mkendall07 merged commit 9de31b3 into master Jul 13, 2017
@mkendall07 mkendall07 deleted the add-no-bid-check branch July 13, 2017 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments