When console errors appear that point to the API itself, the actual issue lies elsewhere. In your browser debugger, examine the Call Stack when the error occurs and follow the stack from the API location back up to the point of your code. From there, look at your line of code and verify that you're passing the correct parameters to an API method (string versus numeric, etc). This is the kind of thing that festers and doesn't appear until some part of the API is expecting a number but gets a string. This is what makes the API look like it has an error.
Good luck!
Steve