Skip to content

Commit

Permalink
Adyoulike: Fix adapter errors if no content (prebid#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisg93 authored and jorgeluisrocha committed Sep 22, 2022
1 parent 53d9160 commit 9205136
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
7 changes: 3 additions & 4 deletions adapters/adyoulike/adyoulike.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ package adyoulike

import (
"encoding/json"
"errors"
"fmt"
"github.com/prebid/prebid-server/config"
"github.com/prebid/prebid-server/openrtb_ext"
"net/http"

"github.com/buger/jsonparser"
"github.com/mxmCherry/openrtb/v15/openrtb2"
"github.com/prebid/prebid-server/adapters"
"github.com/prebid/prebid-server/config"
"github.com/prebid/prebid-server/errortypes"
"github.com/prebid/prebid-server/openrtb_ext"
)

func Builder(bidderName openrtb_ext.BidderName, config config.Adapter) (adapters.Bidder, error) {
Expand Down Expand Up @@ -88,7 +87,7 @@ func (a *adapter) MakeBids(
case http.StatusOK:
break
case http.StatusNoContent:
return nil, []error{errors.New("MakeBids error: No Content")}
return nil, nil
case http.StatusBadRequest:
err := &errortypes.BadInput{
Message: fmt.Sprintf(unexpectedStatusCodeFormat, bidderRawResponse.StatusCode),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,5 @@
],

"expectedBidResponses": [],

"expectedMakeBidsErrors": [
{
"value": "MakeBids error: No Content",
"comparison": "literal"
}
]
"expectedMakeBidsErrors": []
}

0 comments on commit 9205136

Please sign in to comment.