From aa8d6f58b077c6fcc8ae4687ea2bb27db33d452d Mon Sep 17 00:00:00 2001 From: MO Thibault <103271673+MO-Thibault@users.noreply.github.com> Date: Mon, 1 Jun 2026 20:40:45 -0400 Subject: [PATCH] rtd: fall back to global routing for unknown bidders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When defaultEIDSources routes EIDs to bidder-specific fragments (e.g. smartadserver.com → smartadserver), the RTD module was creating new entries in ortb2Fragments.bidder for bidders that don't exist in the auction. Prebid.js then generates eidpermissions with empty bidder arrays, causing PBS to reject the request: "Invalid request: request.ext.prebid.data.eidpermissions[0] missing or empty required field: bidders" Fix: only merge to bidders that already exist in ortb2Fragments.bidder. Unknown bidders fall back to global routing instead of creating phantom bidder entries. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/core/prebid/rtd.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/core/prebid/rtd.ts b/lib/core/prebid/rtd.ts index 2cab1e2..ca53a96 100644 --- a/lib/core/prebid/rtd.ts +++ b/lib/core/prebid/rtd.ts @@ -346,12 +346,13 @@ function handleRtd( if (route === "global") { globalEidsCount += count; skippedEids += merge(config, reqBidsConfigObj.ortb2Fragments.global, ortb2); - } else { + } else if (route in reqBidsConfigObj.ortb2Fragments.bidder) { bidderEidsCount += count; - const bidder = reqBidsConfigObj.ortb2Fragments.bidder[route] ?? {}; - skippedEids += merge(config, bidder, ortb2); - // eslint-disable-next-line no-param-reassign - reqBidsConfigObj.ortb2Fragments.bidder[route] = bidder; + skippedEids += merge(config, reqBidsConfigObj.ortb2Fragments.bidder[route], ortb2); + } else { + config.log("info", `Bidder "${route}" not in auction, routing ${count} EID(s) to global`); + globalEidsCount += count; + skippedEids += merge(config, reqBidsConfigObj.ortb2Fragments.global, ortb2); } });