Mango-information-systems / twitto_be

twitto_be is a real-time tweets analytics dashboard
https://twitto.be
Other
12 stars 2 forks source link

email alerting on error #134

Open mef opened 7 years ago

mef commented 7 years ago

Twitter sometimes disables accounts, since bot behaviour is detected. This prevents twitto_xx twitter accounts from sending top trends notification tweets.

email alerts should be sent when this happens, in order to unlock the account.

Possibly, other error cases should also trigger the emission of an email alert.

Corresponding message received from twitter API:

{
   errors:[
      {
         code: 326,
         message: 'To protect our users from spam and other malicious activity, this account is temporarily locked. Please log in to https://twitter.com to unlock your account.'
      }
   ]
}

happens in /home/srv-node-mango/twitto/controller/tweetStream.js:22

cc @11digitlabs