Skip to content

rtd: fall back to global routing for unknown bidders#295

Open
MO-Thibault wants to merge 1 commit into
Optable:masterfrom
MO-Thibault:mo/rtd-safe-eid-routing
Open

rtd: fall back to global routing for unknown bidders#295
MO-Thibault wants to merge 1 commit into
Optable:masterfrom
MO-Thibault:mo/rtd-safe-eid-routing

Conversation

@MO-Thibault
Copy link
Copy Markdown
Contributor

Summary

  • When a bidder route from defaultEIDSources doesn't exist in the current auction, route EIDs globally instead of creating phantom bidder entries

Problem

defaultEIDSources maps EID sources to specific bidders (e.g. smartadserver.comsmartadserver). When those bidders don't exist in the publisher's Prebid config, the RTD module creates new entries in ortb2Fragments.bidder for non-existent bidders. Prebid.js then generates eidpermissions with "bidders": [], and PBS rejects the request:

Invalid request: request.ext.prebid.data.eidpermissions[0]
missing or empty required field: "bidders"

Affected customers: Unwind, Arena, MediaCo, MyCode, DDM — any publisher using ID5 enrichment where the enriched EID sources (smartadserver, gumgum, triplelift, etc.) don't match their PBS bidder config.

Fix

One-line change in the merge phase of handleRtd(): check route in reqBidsConfigObj.ortb2Fragments.bidder before merging per-bidder. Unknown bidders fall back to global routing.

Before: blindly creates ortb2Fragments.bidder[route] → phantom bidder → empty eidpermissions → PBS error

After: only merges to existing bidders; unknown routes merge to ortb2Fragments.global → EIDs available to all bidders, no phantom entries

Test plan

  • Build succeeds
  • Existing tests pass
  • With defaultEIDSources and a publisher missing smartadserver bidder: no eidpermissions with empty bidders in PBS payload
  • EIDs for unknown bidders appear in global user.ext.eids instead

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant