gmail: improve filter error logging and add limit check#1192
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughTwo utility files are modified to add logging support and enhanced error handling to Gmail filter operations. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
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 |
Add logger to
|
User description
Description
This PR improves the error logging for Gmail filter creation failures and adds a diagnostic check for the 1,000 filter limit.
Changes
Generated description
Below is a concise technical summary of the changes proposed in this PR:
graph LR GmailProvider_createFilter_("GmailProvider.createFilter"):::modified createFilter_("createFilter"):::modified GmailProvider_createAutoArchiveFilter_("GmailProvider.createAutoArchiveFilter"):::modified createAutoArchiveFilter_("createAutoArchiveFilter"):::modified GMAIL_API_("GMAIL_API"):::modified GET_FILTERS_LIST_("GET_FILTERS_LIST"):::added LOGGER_("LOGGER"):::added GmailProvider_createFilter_ -- "Now forwards provider logger to createFilter." --> createFilter_ GmailProvider_createAutoArchiveFilter_ -- "Now forwards provider logger to auto-archive function." --> createAutoArchiveFilter_ createAutoArchiveFilter_ -- "Adds logger when calling createFilter for auto-archive." --> createFilter_ createFilter_ -- "On error, checks filters and may throw SafeError." --> GMAIL_API_ createFilter_ -- "Newly calls getFiltersList to verify filter count." --> GET_FILTERS_LIST_ createFilter_ -- "Logs failure details, parameters, and limit-check results." --> LOGGER_ classDef added stroke:#15AA7A classDef removed stroke:#CD5270 classDef modified stroke:#EDAC4C linkStyle default stroke:#CBD5E1,font-size:13pxEnhances Gmail filter creation by improving error logging and adding a diagnostic check for the 1,000 filter limit. Updates the
createFilterutility function, used byGmailProvider, to log detailed error information and proactively identify when the filter limit is reached, providing a user-friendly message.createFilterutility.Modified files (2)
Latest Contributors(1)
SafeErrorif the limit is reached.Modified files (1)
Latest Contributors(1)