From 00144d5915c5407e041d2a2e71f323e09067534b Mon Sep 17 00:00:00 2001 From: Antonios Sarhanis Date: Tue, 21 May 2024 22:21:50 +1000 Subject: [PATCH] Better warning on misconfigured end points (#11501) --- modules/prebidServerBidAdapter/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/prebidServerBidAdapter/index.js b/modules/prebidServerBidAdapter/index.js index 037119d44a2..d95b8d3ecfc 100644 --- a/modules/prebidServerBidAdapter/index.js +++ b/modules/prebidServerBidAdapter/index.js @@ -426,7 +426,12 @@ function bidWonHandler(bid) { } function getMatchingConsentUrl(urlProp, gdprConsent) { - return hasPurpose1Consent(gdprConsent) ? urlProp.p1Consent : urlProp.noP1Consent; + const hasPurpose = hasPurpose1Consent(gdprConsent); + const url = hasPurpose ? urlProp.p1Consent : urlProp.noP1Consent + if (!url) { + logWarn('Missing matching consent URL when gdpr=' + hasPurpose); + } + return url; } function getConsentData(bidRequests) {