depoio / node-telegram-bot

Client wrapper for Telegram Bot API (Under heavy development)
MIT License
136 stars 30 forks source link

Bot had no response to messages and crashed with TypeError #41

Closed xavieryao closed 9 years ago

xavieryao commented 9 years ago
    } else if(res.statusCode === 401){
                 ^
TypeError: Cannot read property 'statusCode' of undefined
  at Request._callback (/Users/xavieryao/gengbot/node_modules/node-telegram-bot/lib/Bot.js:203:18)
  at self.callback (/Users/xavieryao/gengbot/node_modules/node-telegram-bot/node_modules/request/request.js:198:22)
  at Request.emit (events.js:107:17)
  at Request.onRequestError (/Users/xavieryao/gengbot/node_modules/node-telegram-bot/node_modules/request/request.js:877:8)
  at ClientRequest.emit (events.js:107:17)
  at TLSSocket.socketErrorListener (_http_client.js:271:9)
  at TLSSocket.emit (events.js:129:20)
  at net.js:459:14
  at process._tickCallback (node.js:355:11)
xavieryao commented 9 years ago

[Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect'

xavieryao commented 9 years ago

Turns out to be my internet failure.

shernshiou commented 9 years ago

Thanks for the report.. Will include more robust error message.