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

Centro adapter fix: do not call logError if 'No Bid' was received #1265

Merged
merged 18 commits into from
Jul 14, 2017
Merged

Centro adapter fix: do not call logError if 'No Bid' was received #1265

merged 18 commits into from
Jul 14, 2017

Conversation

Niksok
Copy link
Contributor

@Niksok Niksok commented Jun 5, 2017

Type of change

  • Bugfix

Description of change

In case when 'No Bid' was received in statusMessage, logError now do not called

Other information

Thank you,
CBX

bidObject.height = bid.height;
if (bid && (bid.adTag || bid.statusMessage === 'No bid') && bid.sectionID && bid.sectionID.toString() === unit.toString()) {
if (bid.adTag) {
bidObject = bidfactory.createBid(1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pass the bid request object as the second param to bidfactory.createBid as this will ensure that the bid.bidId in the request matches with the bid.adId in the response.

bidObject.width = bid.width;
bidObject.height = bid.height;
} else {
bidObject = bidfactory.createBid(2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pass the bid request object as the second param to bidfactory.createBid as this will ensure that the bid.bidId in the request matches with the bid.adId in the response.

@Niksok
Copy link
Contributor Author

Niksok commented Jun 15, 2017

Done, please review

Copy link
Collaborator

@protonate protonate left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for changes.

@protonate protonate added the LGTM label Jun 20, 2017
@protonate protonate self-assigned this Jun 20, 2017
@protonate
Copy link
Collaborator

protonate commented Jul 10, 2017

Please rebase onto master and address conflicts then we can merge.

cc: @Niksok

bidObject.height = bid.height;
} else {
bidObject = bidfactory.createBid(2, requestedBid);
}
} else {
// throw exception, or call utils.logError with resp.statusMessage
utils.logError(LOG_ERROR_MESS.unitNum + unit + '. ' + (bid ? bid.statusMessage || LOG_ERROR_MESS.noAdTag : LOG_ERROR_MESS.noBid), bidderCode);
Copy link
Member

Choose a reason for hiding this comment

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

Looks like utils.logError is still called. Is this expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's ok. Main changes contains in this condition "(bid.adTag || bid.statusMessage === 'No bid')" logError must not called in case if bid.statusMessage === 'No bid' regardless of bid.adTag availability.

@mkendall07 mkendall07 merged commit 17a0b79 into prebid:master Jul 14, 2017
jbAdyoulike pushed a commit to jbAdyoulike/Prebid.js that referenced this pull request Sep 21, 2017
…ebid#1265)

* Add centro adapter and tests for it.

* fix bug with different types of bid.sectionID and bid.unit from config

* add query parameter adapter=prebid

* update tests for centro adapter

* fixed bug with call of JSONP callback with name, that contain invalid characters

* Centro adapter fix: do not call logError if 'No Bid' was received

* Centro adapter: pass the bid request object to bidfactory.createBid

* Centro adapter: fix ESLintError
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
…ebid#1265)

* Add centro adapter and tests for it.

* fix bug with different types of bid.sectionID and bid.unit from config

* add query parameter adapter=prebid

* update tests for centro adapter

* fixed bug with call of JSONP callback with name, that contain invalid characters

* Centro adapter fix: do not call logError if 'No Bid' was received

* Centro adapter: pass the bid request object to bidfactory.createBid

* Centro adapter: fix ESLintError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants