Skip to content

Commit

Permalink
improve-server-bid-adapter-error-message (#11858)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaresic committed Jun 24, 2024
1 parent 98801df commit 2cbeb80
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,12 @@ export function PrebidServer() {
doClientSideSyncs(requestedBidders, gdprConsent, uspConsent, gppConsent);
},
onError(msg, error) {
logError(`Prebid server call failed: '${msg}'`, error);
const {p1Consent = '', noP1Consent = ''} = s2sBidRequest?.s2sConfig?.endpoint || {};
if (p1Consent === noP1Consent) {
logError(`Prebid server call failed: '${msg}'. Endpoint: "${p1Consent}"}`, error);
} else {
logError(`Prebid server call failed: '${msg}'. Endpoints: p1Consent "${p1Consent}", noP1Consent "${noP1Consent}"}`, error);
}
bidRequests.forEach(bidderRequest => events.emit(EVENTS.BIDDER_ERROR, { error, bidderRequest }));
done(error.timedOut);
},
Expand Down

0 comments on commit 2cbeb80

Please sign in to comment.