[_]: fix: implement attachment upload limit handling - #116
Conversation
- Introduced AttachmentUploadLimitError to manage scenarios where the upload limit is exceeded. - Enhanced EmailService to throw HttpException with a 429 status when the upload limit is reached. - Updated JmapMailProvider to recognize and propagate upload limit errors from upstream. - Added comprehensive tests for attachment upload scenarios, including limit handling and error propagation. - Improved logging in HttpGlobalExceptionFilter to include details from upstream errors.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR adds quota-aware attachment upload error handling and documents HTTP 429 responses. JMAP errors preserve upstream status codes. Global exception logs now include safely serialized upstream details. ChangesAttachment quota error flow
Exception detail logging
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The PR adds attachment upload-limit error handling and related tests; no actionable merge-blocking risk remains based on the available evidence. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant EmailController
participant EmailService
participant JmapMailProvider
participant JmapService
EmailController->>EmailService: uploadAttachment
EmailService->>JmapMailProvider: uploadAttachment
JmapMailProvider->>JmapService: upload blob
JmapService-->>JmapMailProvider: JmapError with statusCode 403
JmapMailProvider-->>EmailService: AttachmentUploadLimitError
EmailService-->>EmailController: HttpException 429
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
|



Summary by CodeRabbit