Skip to content
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

Implementation Plan For Seat Non Bid Status Codes #2852

Open
ShriprasadM opened this issue Jun 16, 2023 · 17 comments
Open

Implementation Plan For Seat Non Bid Status Codes #2852

ShriprasadM opened this issue Jun 16, 2023 · 17 comments

Comments

@ShriprasadM
Copy link
Contributor

Following is the list of some seat non-bid error codes as per IAB community extension. I am working on mapping of other remaining error codes.
But, by that time @SyntaxNode , @bretg , @bsardo please review following table and confirm if locations mentioned under PBS Source Code column are correct for capturing seat non bid scenarios.

SEAT NON BID ERROR CODE PBS Source Code
100 (Error - General)per bidder
if len(reqData) == 0 {
err = &errortypes.Timeout{Message: err.Error()}
The adapter failed to generate any bid requests, but also failed to generate an error explaining why.
101(Error - Timeout)per bidder
if len(reqData) == 0 {
err = &errortypes.Timeout{Message: err.Error()}
bidder.doRequestImpl
102 (Error - Invalid Bid Response)per bidder
if httpResp.StatusCode < 200 || httpResp.StatusCode >= 400 {
bidder.doRequestImpl
103 (Error - Bidder Unreachable)per bidder https://github.com/prebid/prebid-server/blob/79422a7542634b356f9c13d7774117f2b818e996/exchange/bidder.go#L565bidder.doRequestImpl  if httpStatusCode = 503
201 (Request Blocked - Unsupported Channel (app/site/dooh))per bidder
return nil, []error{&errortypes.Warning{Message: "this bidder does not support site requests"}}
return nil, []error{&errortypes.Warning{Message: "this bidder does not support app requests"}}
202 (Request Blocked - Unsupported Media Type (banner/video/native/audio))
return nil, append(errs, &errortypes.Warning{Message: "Bid request didn't contain media types supported by the bidder"})
203 (Request Blocked - Optimized)  
204 (Request Blocked - Privacy) https://github.com/prebid/prebid-server/blob/79422a7542634b356f9c13d7774117f2b818e996/exchange/utils.go#L170GDPR request blocked
301 (Response Rejected - Below Floor)
errs = append(errs, &errortypes.Warning{
304 (Response Rejected - Below Deal Floor) TBD
@hhhjort
Copy link
Collaborator

hhhjort commented Jun 20, 2023

In exchange/bidder.go, I would say line 137 maps best to 100 (General) and line 534 to 101 (Timeout). Line 565 is correct as 102 (Invalid response).

The infoawarebidder.go errors all look correct.

The exchange/utils.go line looks correct, but will be refactored for the upcoming privacy framework.

The exchange/exchange.go is correct.

I have not had time to go through the code to verify if there are any other areas where bids may be rejected.

@ShriprasadM
Copy link
Contributor Author

Thanks @hhhjort for an update. Can you review 103 (Error - Bidder Unreachable)per bidder

@hhhjort
Copy link
Collaborator

hhhjort commented Jun 26, 2023

Oh, sorry, missed that one. 103 seems reasonable for a 503 error code.

@bretg bretg moved this from Triage to In Progress in Prebid Server Prioritization Jun 30, 2023
@bretg
Copy link
Contributor

bretg commented Jun 30, 2023

Are we good here @ShriprasadM ?

@ShriprasadM
Copy link
Contributor Author

@bretg : I have started on some error codes. I am facing few challenges while implementing. How to obtain impId in bidder.go.

reqData, errs = bidder.Bidder.MakeRequests(bidderRequest.BidRequest, reqInfo)

how can we determine if array of reqData contains separate req per impression or on single request contains multi impression objects?

@bretg
Copy link
Contributor

bretg commented Jul 27, 2023

Closing this issue as covered by the new issue #2973

@bretg bretg closed this as completed Jul 27, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Prebid Server Prioritization Jul 27, 2023
@ShriprasadM
Copy link
Contributor Author

ShriprasadM commented Aug 18, 2023

@bretg : Can we reopen this issue ? I had created this issue to add all seat non bid error codes mentioned here - https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/community_extensions/seat-non-bid.md#list-non-bid-status-codes
The current PR only addressing timeout related error code

@SyntaxNode
Copy link
Contributor

Re-opening. This issue is a discussion on how to implement non bid status codes in PBS-Go. This is separate and disinct from #2973 which solves a specific problem of attributing network failures to impression ids.

@SyntaxNode SyntaxNode reopened this Aug 21, 2023
@SyntaxNode SyntaxNode moved this from Triage to Research in Prebid Server Prioritization Aug 21, 2023
@SyntaxNode SyntaxNode changed the title Addition of seat non bid error codes Implementation Plan For Seat Non Bid Status Codes Aug 21, 2023
@ashishshinde-pubm
Copy link
Contributor

ashishshinde-pubm commented Aug 23, 2023

Sr No SEAT NON BID ERROR CODE PBS Source Code
1 351: Response Rejected - Invalid Creative (Size Not Allowed)
if !e.validateBannerCreativeSize(bid, bidResponseExt, adapter, pubID, e.bidValidationEnforcement.BannerCreativeMaxSize) {
2 352: Response Rejected - Invalid Creative (Not Secure)
if !e.validateBidAdM(bid, bidResponseExt, adapter, pubID, e.bidValidationEnforcement.SecureMarkup) {
3 350: Response Rejected - Invalid Creative
4 300- Response Rejected - General
errs = append(errs, berr)
5 300: Response Rejected - General
6 100-Error - General
errs = append(errs, err)

@ashishshinde-pubm
Copy link
Contributor

@SyntaxNode , @bretg , @bsardo please review above table and confirm if locations mentioned under PBS Source Code column are correct for capturing seat non bid scenarios.

For point (3) in above table, we have few queries regarding ortb2blocking module.

  1. What if one creative gets rejected with multiple reasons (example - if same bid is rejected due to both bcat and badv) then should we log multiple reasons in seat-non-bid ? if we have to log single record then which one to prioritise? Do you think adding errmessage in non-bid structure would be helpful and can handle such use-cases by providing granular information ?

  2. Implementation approach - How module should report non-bids rejected in module to PBS source code ?
    2.1 Introduce seatNonBids under HookOutcome ?
    2.2 Use hookanalytics.Analytics present in HookOutcome ? --> we might need to ask module developer to return rejected bids using specific Activity.Name
    2.3 How to handle the case, where same bid can get rejected in multiple modules due to different reasons ? Should we add multiple records in seat-non-bid ? if not then which one to prioritise ?

@bretg
Copy link
Contributor

bretg commented Nov 3, 2023

Should we add multiple records in seat-non-bid ? if not then which one to prioritise ?

If there are multiple reasons, pick one -- any one. The idea is that someone will fix one of the issues and then the next one will appear.

If you're looking for an algorithm to pick, then we would suggest choosing the lowest numbered seatnonbid code.

@bsardo
Copy link
Collaborator

bsardo commented Nov 29, 2023

Hi @ashishshinde-pubm, I agree with all of the locations for capturing the specified non bid error codes except for (3) where you’re proposing we return 350 when the ortb2blocking module detects an error in the raw bidder response hook. Instead, I think we may want to return 356 (Response Rejected - Invalid Creative - Advertiser Blocked) if the ortb2blocking module config was loaded from the account config and 350 (Response Rejected - Invalid Creative) if the config was loaded from the host config. Thoughts?

@ashishshinde-pubm
Copy link
Contributor

Hi @bsardo ,
For point (3) the bid may get rejected due to any reason (badv/bcat/cattax/battr) that's why I was thinking to provide the generic NBR (350 (Response Rejected - Invalid Creative)).
Do you see any difference between config loaded from account-config vs config loaded from host-config ?

@ashishshinde-pubm
Copy link
Contributor

As discussed in the bi-weekly meeting, we should return code 356 (Response Rejected - Invalid Creative - Advertiser Blocked) if bid gets rejected due to "badv" field.
For other rejection due to bcat/cattax/battr, we can return generic code 350 (Response Rejected - Invalid Creative).

@bsardo
Copy link
Collaborator

bsardo commented Dec 19, 2023

As discussed, we also should not care whether the config was loaded from the host or the account as I had originally mentioned. The behavior should be same in both cases.

@bretg
Copy link
Contributor

bretg commented Aug 23, 2024

@ShriprasadM , @bsardo - is the "plan" part of this done? I thought we were well into implementation at this point?

@bretg
Copy link
Contributor

bretg commented Dec 11, 2024

@ShriprasadM - are we good here? If the PR's pretty much done, perhaps the tracking issue can be closed out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

6 participants