Skip to content

Need check for 502 error #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dcromster opened this issue Feb 4, 2017 · 1 comment
Open

Need check for 502 error #166

dcromster opened this issue Feb 4, 2017 · 1 comment

Comments

@dcromster
Copy link

I think we need check for this situation:

[error]
api request error: Telegram returned some html instead of json. Body:

<title>502 Bad Gateway</title>

502 Bad Gateway


nginx/1.10.0

Error: SyntaxError: Unexpected token < in JSON at position 0
at Object.parse (native)
at IncomingMessage.response.on.e (/home/ubuntu/broader/telegram/node_modules/tiny_request/lib/network.js:70:40)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

[log]
Retry request TelegramApiRequest {
_method: 'getUpdates',
_params: { timeout: 50, offset: 0 },
_multipart: undefined }

@jesusgn90
Copy link

It seems like a telegram internal error. Maybe a error handler p
For general purpose will be fine to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants