You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using the nestjs-telegram module in my NestJS project to integrate with Telegram Bot API. However, I'm encountering an issue where the server crashes if there is a connection problem with Telegram, or if a Bad Request error occurs during communication with the Telegram API.
Whenever a connection to Telegram fails or an invalid request is made, it causes the server to crash, which is disruptive to the application's operation. I would like to know if the nestjs-telegram module is designed to handle such errors gracefully and prevent server crashes.
Specifically, when an error like 401 Unauthorized or a timeout occurs, the bot should log the error and continue running without impacting the rest of the application.
Steps to reproduce:
Configure nestjs-telegram with a valid Telegram bot token.
Simulate a failed connection to Telegram (e.g., invalid token or network issue).
Observe that the server crashes or the application stops running.
Expected behavior:
The server should not crash when an error occurs while connecting to the Telegram API.
The bot should handle connection errors (e.g., bad requests, timeouts) gracefully and continue running.
Errors should be logged properly for further debugging, but should not cause a complete server failure.
Actual behavior:
The server crashes or stops responding when there is a connection issue with Telegram or a Bad Request error.
Additional context:
I'm using the latest version of nestjs-telegram.
I'm using NestJS with a custom error handling mechanism to prevent server crashes in other parts of the application.
The Telegram bot token is correctly set in the configuration, but errors still occur.
The text was updated successfully, but these errors were encountered:
Update 24/12/2024, Really doesn't completely solve the problem of app crashing when sending message with response status code 400 or 502. I think we should use axios to call http request to send message.
I'm currently using the nestjs-telegram module in my NestJS project to integrate with Telegram Bot API. However, I'm encountering an issue where the server crashes if there is a connection problem with Telegram, or if a Bad Request error occurs during communication with the Telegram API.
Whenever a connection to Telegram fails or an invalid request is made, it causes the server to crash, which is disruptive to the application's operation. I would like to know if the nestjs-telegram module is designed to handle such errors gracefully and prevent server crashes.
Specifically, when an error like 401 Unauthorized or a timeout occurs, the bot should log the error and continue running without impacting the rest of the application.
Steps to reproduce:
Configure nestjs-telegram with a valid Telegram bot token.
Simulate a failed connection to Telegram (e.g., invalid token or network issue).
Observe that the server crashes or the application stops running.
Expected behavior:
The server should not crash when an error occurs while connecting to the Telegram API.
The bot should handle connection errors (e.g., bad requests, timeouts) gracefully and continue running.
Errors should be logged properly for further debugging, but should not cause a complete server failure.
Actual behavior:
The server crashes or stops responding when there is a connection issue with Telegram or a Bad Request error.
Additional context:
I'm using the latest version of nestjs-telegram.
I'm using NestJS with a custom error handling mechanism to prevent server crashes in other parts of the application.
The Telegram bot token is correctly set in the configuration, but errors still occur.
The text was updated successfully, but these errors were encountered: