lukefx / hubot-telegram

Hubot adapter for Telegram
MIT License
160 stars 42 forks source link

ERROR Error: HTTP status 504 returned. #45

Closed ishankhare07 closed 8 years ago

ishankhare07 commented 8 years ago
ERROR Error: HTTP status 504 returned.
2016-04-05T20:56:20.680438+00:00 app[web.1]:   at Function.TelegramBot.error (/app/node_modules/hubot-telegram/node_modules/telegrambot/lib/telegrambot.js:26:15)
2016-04-05T20:56:20.680440+00:00 app[web.1]:   at Request._callback (/app/node_modules/hubot-telegram/node_modules/telegrambot/lib/telegrambot.js:48:62)
2016-04-05T20:56:20.680441+00:00 app[web.1]:   at Request.self.callback (/app/node_modules/hubot-telegram/node_modules/telegrambot/node_modules/request/request.js:200:22)
2016-04-05T20:56:20.680442+00:00 app[web.1]:   at Request.emit (events.js:98:17)
2016-04-05T20:56:20.680443+00:00 app[web.1]:   at Request.<anonymous> (/app/node_modules/hubot-telegram/node_modules/telegrambot/node_modules/request/request.js:1041:10)
2016-04-05T20:56:20.680443+00:00 app[web.1]:   at Request.emit (events.js:117:20)
2016-04-05T20:56:20.680444+00:00 app[web.1]:   at IncomingMessage.<anonymous> (/app/node_modules/hubot-telegram/node_modules/telegrambot/node_modules/request/request.js:968:12)
2016-04-05T20:56:20.680445+00:00 app[web.1]:   at IncomingMessage.emit (events.js:117:20)
2016-04-05T20:56:20.680446+00:00 app[web.1]:   at _stream_readable.js:944:16
2016-04-05T20:56:20.680447+00:00 app[web.1]:   at process._tickCallback (node.js:458:13)
2016-04-05T20:56:20.680448+00:00 app[web.1]: 
arcturial commented 8 years ago

504 error is a gateway timeout. This happens from time to time when connecting to Telegram.

@lukefx do you think this is something that we should retry in the bot or the adapter? Or should the error just be handled a bit better?

arcturial commented 8 years ago

This error happens on the Telegram API. I don't know why, but it's usually temporary. Currently, the adapter will just report on it and try again next time. I don't want to remove the error, because it is actually legitimate. This seems to happen with polling and since the bot will poll again at the set interval, it shouldn't be a problem.

I am resolving this for now. Please reopen it if it's causing your application to not work as intended.