CoinGecko-API icon indicating copy to clipboard operation
CoinGecko-API copied to clipboard

"error code: 1015" not treated as rate limit error

Open ModeoC opened this issue 2 years ago • 1 comments

I was for-looping to get prices of multiple tokens. My server receives error: SyntaxError: Unexpected token e in JSON at position 0. I used debugger and found out that the problem occurs here in CoinGecko.js:

            //Check if page is returned instead of JSON
            if (body.startsWith('<!DOCTYPE html>')) {
              Utils._WARN_('Invalid request', 'There was a problem with your request. The parameter(s) you gave are missing or incorrect.');
            } else if (body.startsWith('Throttled')) {
              Utils._WARN_('Throttled request', 'There was a problem with request limit.');
            }
            //Attempt to parse
            body = JSON.parse(body);

ModeoC avatar May 30 '22 23:05 ModeoC

Do you still need help ?

HelpSupports avatar Jun 06 '22 08:06 HelpSupports