Shields: [TwitterFollow] TypeError: Cannot read property 'followers_count' of undefined

Created on 25 Jul 2019  路  2Comments  路  Source: badges/shields

Sentry Issue: SHIELDS-2V

TypeError: Cannot read property 'followers_count' of undefined
  File "/home/m/shields/services/twitter/twitter.service.js", line 124, in TwitterFollow.handle
    return this.constructor.render({ user, followers: data[0].followers_count })
  ?, in null.<anonymous>
bug sentry service-badge

All 2 comments

I've managed to reproduce this error when using only spaces in the Twitter user name. In that case, an error response similar to the following is returned by the API:
{"headers":{"status":400,"message":"exactly one of user_ids or screen_names required, neither provided"}}

However, our badge is expecting a list of elements, hence the error. Will provide a fix.

Last seen Aug 12 馃憤

Was this page helpful?
0 / 5 - 0 ratings