Remove corrupted file answer and improve logs#492
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRenamed and consolidated structured-logging scoped values and log-key constants; updated call sites to use the new keys; removed CorruptedFileException and the CORRUPTED reply/tests; unified exception handling and logging for file processing and temp-file cleanup. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client as "Telegram Client"
participant Bot as "Stickerify Bot"
participant Media as "MediaHelper"
participant FS as "Filesystem"
participant Logger as "StructuredLogger"
Client->>Bot: send media message
Bot->>Logger: set REQUEST_DETAILS_VALUE
Bot->>Media: validate & convert media
Media->>Logger: set MIME_TYPE_VALUE
Media->>FS: create temp files / run ffmpeg
FS-->>Media: temp file path / result
Media->>Logger: log FILE_PATH_LOG_KEY / STICKER_LOG_KEY
Media-->>Bot: converted file or MediaException
alt converted file
Bot->>Logger: set FILE_ID_VALUE
Bot->>Client: send converted file
else MediaException
Bot->>Logger: log EXCEPTION_MESSAGE_LOG_KEY and ORIGINAL_REQUEST_LOG_KEY
Bot->>Client: send ERROR reply
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
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 |
MartelliEnrico
left a comment
There was a problem hiding this comment.
please see in file comments
Summary by CodeRabbit
Bug Fixes
Chores
Tests