-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
src/adapters/centro.js
Outdated
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); |
There was a problem hiding this comment.
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.
src/adapters/centro.js
Outdated
bidObject.width = bid.width; | ||
bidObject.height = bid.height; | ||
} else { | ||
bidObject = bidfactory.createBid(2); |
There was a problem hiding this comment.
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.
Done, please review |
There was a problem hiding this 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.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
…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
…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
Type of change
Description of change
In case when 'No Bid' was received in statusMessage, logError now do not called
Other information
Thank you,
CBX