fix: send full error as log file when message exceeds Telegram limit - #86
Merged
Conversation
Nachtalb
force-pushed
the
fix/error-log-attachment
branch
2 times, most recently
from
February 26, 2026 15:19
347a3f8 to
e7b7cf9
Compare
When a logged error message exceeds Telegram's 4096-char limit, send a truncated message followed by the full plain-text error as a .log file attachment. Removes the old silent in-format truncation in favour of explicit overflow handling in emit().
Nachtalb
force-pushed
the
fix/error-log-attachment
branch
from
February 26, 2026 15:20
e7b7cf9 to
0f42549
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an error message (e.g. a long traceback) exceeded Telegram's 4096-char message limit, the old code silently truncated the traceback inside
format()β making it impossible to diagnose the actual root cause.Solution
format()intoemit().logfile attachment (namederror_<timestamp>_<level>.log)format()no longer silently truncates β it wraps tracebacks in<pre>without cutting them