TypeError: Cannot read property 'indexOf' of undefined in error_handler.js and response_handler.js
Closed this issue · 3 comments
armellarcier commented
// lib/kickbox/http_client/error_handler.js line 21
if (type.indexOf('json') != -1 && typeof body == 'object') {
will throw TypeError: Cannot read property 'indexOf' of undefined
pretty ofter for a few days!
Same here
// lib/kickbox/http_client/response_handler.js line 11
if (type.indexOf('json') != -1 && typeof(body) != 'object') {
armellarcier commented
Thanks! But why is the api not responding like it used to???
danhstevens commented
Are you hitting the 429 rate limit error by chance? That limit is imposed by a firewall so it doesn't return a json response http://docs.kickbox.io/docs/using-the-api#api-limits
armellarcier commented
Yes it seems I am. Thanks for the pointers but how am I supposed to handle the queue? Isn't the package supposed to do that?