-
Notifications
You must be signed in to change notification settings - Fork 33
Traffic Boost: Improve error handling #3337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traffic Boost: Improve error handling #3337
Conversation
📝 WalkthroughWalkthroughThe changes introduce more explicit and consistent error handling throughout several dashboard and provider components. Hard errors (those that should not trigger retries) are now identified and surfaced to the UI, with conditional rendering to display error messages directly to users. Error handling logic is refactored to distinguish between soft and hard errors, propagate hard errors through component props, and prevent redundant notifications for non-retriable errors. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PostsTable
participant StatsProvider
participant TrafficBoostProvider
participant TrafficBoostSidebar
participant TabsContent
User->>PostsTable: Initiate data fetch
PostsTable->>StatsProvider: getStats()
StatsProvider-->>PostsTable: PostStats[] or Error
alt Error occurs
PostsTable->>PostsTable: Classify error (ContentHelperError or generic)
PostsTable->>PostsTable: Set error state
PostsTable-->>User: Display error message (except "no data" error)
else Success
PostsTable-->>User: Display data
end
User->>TrafficBoostProvider: generateBatchSuggestions()
TrafficBoostProvider-->>TrafficBoostProvider: Check error type
alt Hard error (retryFetch falsy)
TrafficBoostProvider-->>TrafficBoostSidebar: Pass hardError prop
TrafficBoostSidebar->>TabsContent: Pass hardError prop
TabsContent-->>User: Display hard error message
else Soft error or success
TrafficBoostProvider-->>TrafficBoostSidebar: No hardError
TabsContent-->>User: Display normal tab content or soft error via snackbar
end
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm warn config production Use Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
A last todo item for this PR is to modify the message when the credentials are not eligible (screenshot 4). I think we should state the tiers where the feature is available, as well as have a link to the Lobby Post and/or docs. |
alecgeatches
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
This is the error message I've come up with when credentials are ineligible for TB. This is what we'll be shipping with at the moment:
cc @LauraKalnicky FYI. |


Description
Traffic Boost error handling was incomplete, with a few important side-effects such as:
This PR solves for these cases by fixing/adding some error handling code, as well as introducing a way to show persistent messages in the UI. Soft errors (those allowing execution to continue) will still appear in a snackbar, while hard errors (those who result in execution stopping) will be displayed as persistent messages.
Motivation and context
Give correct feedback to the user, with persisting error messages where needed.
How has this been tested?
The current testing focused on hard errors, especially for the cases where credentials do not work for Traffic Boost (no API Secret present or given credentials don't have TB access). Tested manually using 2 different credential sets (the first eligible for TB, the second not). I haven't tested every possible error. There could be edge cases that can be addressed in the future with more extensive testing, but the current modifications should solve for most cases.
Screenshots
Summary by CodeRabbit
New Features
Bug Fixes
Refactor