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

Getting an Undefined Console.log output #30

Open
TallTejas opened this issue Mar 11, 2022 · 1 comment
Open

Getting an Undefined Console.log output #30

TallTejas opened this issue Mar 11, 2022 · 1 comment

Comments

@TallTejas
Copy link

When I just run the example code:

const SneaksAPI = require('sneaks-api');
const sneaks = new SneaksAPI();

//getProducts(keyword, limit, callback) takes in a keyword and limit and returns a product array 
sneaks.getProducts("Yeezy Cinder", 1, function(err, products){
    console.log(products)
})

I'm getting the following error:

HTTPError: Response code 530 (undefined)
    at Request.<anonymous> (c:\Users\tallt\node_modules\got\dist\source\as-promise\index.js:117:42)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start: 1647028516117,
    socket: 1647028516170,
    lookup: undefined,
    connect: undefined,
    secureConnect: undefined,
    upload: 1647028516171,
    response: 1647028516220,
    end: 1647028516222,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 53,
      dns: undefined,
      tcp: undefined,
      tls: undefined,
      request: NaN,
      firstByte: 49,
      download: 2,
      total: 105
    }
  }
}
[
  {
    lowestResellPrice: { stockX: 222, flightClub: 205, goat: 231 },
    imageLinks: [],
    _id: 622ba924b422211908155725,
    shoeName: 'adidas Yeezy Boost 350 V2 Mono Cinder',
    brand: 'adidas',
    silhoutte: 'adidas Yeezy Boost 350 V2',
    styleID: 'GX3791',
    make: 'adidas Yeezy Boost 350 V2',
    colorway: 'Mono Cinder/Mono Cinder/Mono Cinder',
    retailPrice: 220,
    thumbnail: 'https://images.stockx.com/images/adidas-Yeezy-Boost-350-V2-Mono-Cinder-Product.jpg?fit=fill&bg=FFFFFF&w=700&h=500&fm=webp&auto=compress&trim=color&q=90&dpr=2&updated_at=1635434704',
    releaseDate: '2021-06-24',
    description: "The Yeezy Boost 350 V2 'Mono Cinder' features a blacked-out look on its updated construction. Releasing as part of the Mono Pack, the shoe's upper is built with monofilament mesh in place of the usual Primeknit, finished entirely in black. The signature side stripe adds a minor deviation, while an internal cage and webbing heel pull-loop support the fit. Underfoot, the tonal tooling includes a Boost midsole wrapped in a rubber cage for cushioning, while the shoe itself dropped exclusively on Yeezy Supply.",
    urlKey: 'adidas-yeezy-boost-350-v2-mono-cinder',
    resellLinks: {
      stockX: 'https://stockx.com/adidas-yeezy-boost-350-v2-mono-cinder',
      flightClub: 'https://www.flightclub.com/yeezy-boost-350-v2-mono-light-yzy-350-v2-mono-light',
      goat: 'http://www.goat.com/sneakers/yeezy-boost-350-v2-mono-light-yzy-350-v2-mono-light'
    },
    goatProductId: 743922
  }
]

I get the right info at the end, but I have to sift through the error message. How do I fix this?

@aryan-chakrabarti
Copy link

Getting this issue too, for now I'm just ignoring the HTTP error output. Hope there is a fix for this!

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