Skip to content
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

Print errors from action handlers in stdout instead of ignoring them #197

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

swamp-agr
Copy link
Collaborator

telegram-bot-simple

Right now

  • if you call Telegram API method
  • that return non-200 status code
  • via liftClientM inside action handler,
  • the entire action will be ignored.

This PR prints Telegram Bot API errors in stdout in the same way as with parser errors for incoming updates instead of silently ignoring them.

For now liftClientM documentation updated. Unfortunately, Telegram Bot API does not provide error status code that could be easily modelled in telegram-bot-api. As far as I see, it is a subject of reverse-engineering (example: https://github.com/TelegramBotAPI/errors). We will think about the better way of dealing with such issues.

@swamp-agr swamp-agr merged commit 38be21d into master Nov 7, 2024
5 checks passed
@swamp-agr swamp-agr deleted the log-api-exceptions-from-action-handlers branch November 7, 2024 19:28
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

Successfully merging this pull request may close these issues.

1 participant