Skip to content

Commit

Permalink
fix metrics for web requests (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
shunj-nb authored May 19, 2023
1 parent 11cd3ab commit 651da57
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions endpoints/openrtb2/msp_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ func (m *mspExtOutput) processStoredAb(rawReq []byte, storedReqFetcher stored_re
return nil, []error{err}
}

if ab.Init && req.Device != nil && req.App != nil {
bucketList, err := ab.GetMspAB().GetBucket(req.User.ID, req.Device.OS, req.App.Ver)
if err != nil {
return nil, []error{err}
if ab.Init && req.Device != nil {
bucketList := []string{}
var err error
if req.App != nil {
bucketList, err = ab.GetMspAB().GetBucket(req.User.ID, req.Device.OS, req.App.Ver)
if err != nil {
return nil, []error{err}
}
}

m.AdsLayerAbBuckets = bucketList
Expand Down

0 comments on commit 651da57

Please sign in to comment.