-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downgrade errors to warnings when adapter doesn't support imp format #2385
Conversation
@@ -78,19 +78,19 @@ func pruneImps(imps []openrtb2.Imp, allowedTypes parsedSupports) (int, []error) | |||
for i := 0; i < len(imps); i++ { | |||
if !allowedTypes.banner && imps[i].Banner != nil { | |||
imps[i].Banner = nil | |||
errs = append(errs, &errortypes.BadInput{Message: fmt.Sprintf("request.imp[%d] uses banner, but this bidder doesn't support it", i)}) | |||
errs = append(errs, &errortypes.Warning{Message: fmt.Sprintf("request.imp[%d] uses banner, but this bidder doesn't support it", i)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to add a new warning code for this case where a media type is not supported.
@AlexBVolcy was any consideration given to @hhhjort's suggestion on the issue that we may still want an error if there are no adapters able to service a format requested in a request? At a glance, it looks like this would require a refactor of the core bidder loop or could perhaps introduce added complexity that we don't feel is worth it but I figured I should ask. |
This was discussed offline. The suggestion to throw an error if there are no adapters able to service a requested format is a behavior change outside of the scope of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The return statements haven't changed so the logic flow is the same, it's just the error types that changed. Tested locally and new warnings look good.
* origin/master: (316 commits) Fix alt bidder code test broken by imp wrapper commit (prebid#2405) ImpWrapper (prebid#2375) Update sspBC adapter to v5.7 (prebid#2394) Change errors to warnings (prebid#2385) TheMediaGrid: support native mediaType (prebid#2377) Huaweiadsadapter gdpr (prebid#2345) Add alternatebiddercodes in Prebid request ext (prebid#2339) Changed FS bidder names to mixed case (prebid#2390) Load bidders names from file system in lowercase (prebid#2388) consumable adapter: add schain and coppa support (prebid#2361) Adapter aliases: moved adapter related configs to bidder.yaml files (prebid#2353) pubmatic adapter: add param prebiddealpriority (prebid#2281) Yieldlab Adapter: Add support for ad unit sizes (prebid#2364) GDPR: add enforce_algo config flag and convert enforce_purpose to bool (prebid#2330) Resolves CVE-2022-27664 (prebid#2376) AMP Endpoint: support parameters consentType and gdprApplies (prebid#2338) Dianomi - added usync for redirect (prebid#2368) Create issue_prioritization.yml (prebid#2372) Update yaml files for gzip supported bidders (prebid#2365) Adnuntius Adapter: Set no cookies as a parameter (prebid#2352) ...
This PR addresses this issue: #2178
The goal of this PR is: In the situation when an adapter doesn't support the format indicated from the request imp, an error is thrown that we want downgraded to a warning since this error is unnecessary to be written to analytics
This error is thrown from the bidder wrapper
InfoAwareBidder
's call tooMakeRequests()
. So for all the error checks that check if an adapter doesn't support the imp format (i.e.{&errortypes.BadInput{Message: "this bidder does not support site requests"}
), we downgrade those to a warning (i.e.{&errortypes.Warning{Message: "this bidder does not support site requests"}
)Tests were updated with this change.