Top-gg-Community / node-sdk

An official module for interacting with the Top.gg API
https://topgg.js.org/
133 stars 42 forks source link

No catch() in the constructor's setInterval #4

Closed nyanotech closed 6 years ago

nyanotech commented 6 years ago

If you call the constructor with a token and a client, there is no catch for the postStats() in the setInterval. This doesn't affect much, but it does make node print the deprecation warning for unhandled promise rejections every time DBL returns a 500 error.

IMO, the library should either let the user provide a callback for errors or console.error() them.