Skip to content

Commit

Permalink
Update admatic.go
Browse files Browse the repository at this point in the history
  • Loading branch information
bakicam committed May 24, 2024
1 parent f025b87 commit b02724b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions adapters/admatic/admatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R
return nil, nil
}

if responseData.StatusCode != http.StatusOK {
err := &errortypes.BadServerResponse{
Message: fmt.Sprintf("Unexpected status code: %d. Run with request.debug = 1 for more info.", responseData.StatusCode),
}
return nil, []error{err}
}

var response openrtb2.BidResponse
if err := json.Unmarshal(responseData.Body, &response); err != nil {
return nil, []error{err}
Expand Down

0 comments on commit b02724b

Please sign in to comment.