Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
|
Caution Review failedThe pull request is closed. WalkthroughReworks telegram error logging to build and send HTML-formatted error messages. Extracts user/chat context from provided userInfo, selects a relevant stack frame (excluding error_logger.go when possible), timestamps the message, and dispatches it via a new HTML-specific sender asynchronously. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant EL as ErrorLogger
participant TG as Telegram API (HTML)
Caller->>EL: LogError(err, userInfo, ctx)
rect rgba(230,240,255,0.5)
note right of EL: Extract user/chat from userInfo<br/>Find nearest non-self stack frame<br/>Build HTML message + timestamp
end
par Async dispatch
EL-->>TG: sendToTelegramHTML(htmlMessage)
end
TG-->>EL: ack/response (async)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
User description
…at context
PR Type
Enhancement
Description
Enhanced error logging with HTML formatting and expandable blockquotes
Added detailed user and chat context extraction (username, ID, chat title)
Implemented stack trace location tracking with caller information
Replaced plain text formatting with HTML-escaped rich formatting
Diagram Walkthrough
File Walkthrough
error_logger.go
Enhanced error logging with HTML formatting and contextinternal/telegram/error_logger.go
utils.EscapeHTMLchat details (title, ID) from
userInfoparametersruntime.Caller()toinclude file location and function name
Summary by CodeRabbit