mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #1542] TelegramBotHandler throws when Telegram API returns "message is too long" error #660
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#660
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sergiks on GitHub (Mar 17, 2021).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1542
Monolog version 2.0.0
Telegram Bot API sendMessage() method has a message length limit of "4096 characters after entities parsing"
Added logging to my Telegram bot. Since stack trace might get long, Telegram API returns an error which is thrown unhandled by TelegramBotHandler:
Solution options:
@alexandrmazur96 commented on GitHub (Mar 30, 2021):
Hi!
I have introduced PR some time ago. Before (and if!) it will be merged you can alternatively handle this by yourself:
Create a new
TelegramBotHandlerclass in your project and extend it fromMonolog\TelegramBotHandler, then override proper methods in your class (you can use code from my PR).@Seldaek commented on GitHub (Mar 13, 2022):
Fixed by #1616