Skip to content

Commit

Permalink
Rubicon Analytics: handle bad auction case (#8192)
Browse files Browse the repository at this point in the history
* handle bad auction

* rename auctionCache
  • Loading branch information
robertrmartinez authored Mar 17, 2022
1 parent 3ca2ef1 commit 39776d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/rubiconAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,12 @@ let rubiconAdapter = Object.assign({}, baseAdapter, {
break;
case AUCTION_END:
// see how long it takes for the payload to come fire
cache.auctions[args.auctionId].endTs = Date.now();
let auctionData = cache.auctions[args.auctionId];
// if for some reason the auction did not do its normal thing, this could be undefied so bail
if (!auctionData) {
break;
}
auctionData.endTs = Date.now();

const isOnlyInstreamAuction = args.adUnits && args.adUnits.every(adUnit => adUnitIsOnlyInstream(adUnit));
// If only instream, do not wait around, just send payload
Expand Down

0 comments on commit 39776d7

Please sign in to comment.