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

Decision SDK Request w/ "count" of 7 or higher seems to silently fail. #17

Closed
PlasticMohawk opened this issue Jan 20, 2021 · 2 comments
Closed

Comments

@PlasticMohawk
Copy link

PlasticMohawk commented Jan 20, 2021

const adzerk = require("@adzerk/decision-sdk")
let client = new adzerk.Client({ networkId: xxxxx });
let request = {
  placements: [
    {
      adTypes: [ 91 ],
      siteId: xxxxx,
      zoneIds: [ xxxxx ],
      count: 7,
      divName: 'div1,
      adQuery: {
        categoryId: { min: 20, max: 20, required: true },
        subcategoryId: { min: 191, max: 191, required: true }
      },
      properties: { categoryId: xxxxx, subcategoryId: xxxxx, deliveryZoneId: xxxxxx },
      eventIds: [ 3, 60, 62 ]
    }
  ],
  user: { key: 'not-yet-implmented' }
}
client.decisions.get(request).then(response => {
  console.dir(response, { depth: null });
})
.catch(err => console.err(err))
.finally(console.log('finished'));

^ The above SDK request seems to consistently fail when the count is set to 7. It consistently returns a response when it's 6 or under.

Current SDK version:

"@adzerk/decision-sdk": { "version": "1.0.0-beta.5", "resolved": "https://registry.npmjs.org/@adzerk/decision-sdk/-/decision-sdk-1.0.0-beta.5.tgz", "integrity": "sha512-/iEEQXwomptrGn7Vdvv9I932LsmiYqiAoStib6MIglhcZ5ThJ4YVKC9CwGF+qykWRBQHzr3WSn24prdy9TCHZg==", "requires": { "debug": "^4.1.1", "form-data": "^2.5.1", "isomorphic-unfetch": "^3.0.0" } },

@CrshOverride CrshOverride transferred this issue from adzerk/adzerk-decision-sdk-ruby Jan 21, 2021
@CrshOverride
Copy link
Contributor

Our SDK uses node-fetch internally. I have manually verified that we're getting bit by the same root issue found in node-fetch/node-fetch#739 which will be addressed by node-fetch/node-fetch#1064.

I'm attempting to find a workaround until that PR gets merged/released.

@CrshOverride
Copy link
Contributor

Workaround implemented in a58853e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants