gramio: Error when fetching updates
Error received when fetching updates TypeError: fetch failed
at node:internal/deps/undici/undici:13502:13
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Bot._callApi (/app/node_modules/gramio/dist/index.cjs:557:22)
at async suppressError (/app/node_modules/gramio/dist/utils-CYIya32k.cjs:64:13)
at async Object.withRetries (/app/node_modules/gramio/dist/utils-CYIya32k.cjs:70:31)
at async Updates.startFetchLoop (/app/node_modules/gramio/dist/index.cjs:356:25) {
[cause]: Error: connect EHOSTUNREACH 149.154.167.220:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
errno: -113,
code: 'EHOSTUNREACH',
syscall: 'connect',
address: '149.154.167.220',
port: 443
}
}
I get this error at least 4/5 times a day. The bot still continues to work without interruption. It is hosted on an aws VPS.
Is there a way to solve this error?
The code of my bot can be viewed here: Aztec Bot
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (2 by maintainers)
Yeah we should cover more cases in the documentation Feel free to ask anything
You should also put your token at the bot.start method or directly call setWebhook method
webhookHandler is just receiver
Gotcha! Thanks again!
https://github.com/telegraf/telegraf/blob/0638cf4cc7ba8467ccb9222726024c99c54d119f/src/core/network/polling.ts#L74
Yea they notice about errors only in DEBUG=telegraf:* mode
I can also make it configurable but in my opinion it is important to show this errors to developer
What do you think about this?