Naltox / telegram-node-bot

Node module for creating Telegram bots.
MIT License
721 stars 143 forks source link

bot stops after "Api error: Body: { ok: false, error_code: 401, description: 'Unauthorized' }" #92

Closed dutu closed 7 years ago

dutu commented 8 years ago

The error below occurs and bot stops. The issues goes away after bot restart (only)

[warn]    
Api error: Body: { ok: false, error_code: 401, description: 'Unauthorized' } 
Orel2888 commented 8 years ago

Same problem

Naltox commented 8 years ago

You can get this error when you don't pass token to api, or there is a bug in Telegram server.

dutu commented 8 years ago

yes, it's due to an improper response from Telegram server. The situation should be handled so that the bot retries again after some time

Naltox commented 7 years ago

@dutu Library can retry requests, but only when there is a network problem, we cant detect that in this case this is an error from tg side