pat310 / google-trends-api

An API layer on top of google trends
https://www.npmjs.com/package/google-trends-api
MIT License
874 stars 174 forks source link

randomly exiting node without error warning #128

Open ghost opened 4 years ago

ghost commented 4 years ago

No idea why but it randomly quits my node process with no error warning or way to catch it. Only happens once in 50 or something which makes it impossible to debug why.

  const proxyAgent = new HttpsProxyAgent(`http://${proxy.proxyUsername}:${proxy.proxyPassword}@${proxy.proxy}`)

  let res = await googleTrends.interestOverTime({
    keyword: ['something', 'something else'],
    geo: 'FR',
    startTime: new Date(getDaysAgoTimestamps(365)),
    agent: proxyAgent
  })
  debug({res})