♻️ Refactor error handling to use showError#294
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughError handling in the Scan and Product screens now uses ChangesError reporting migration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
7fa10e3 to
e2cfac2
Compare
e2cfac2 to
fecddab
Compare
This pull request refactors error handling across the app by removing the custom
ErrorContextand switching to a standardized error display mechanism provided byuseShareScreenshot. This change ensures that error messages are consistently shown throughout the application and simplifies the codebase by eliminating redundant context and hooks.Error handling refactor:
ErrorContextand itsuseErrorhook, along with all related code inecoscan_app/context/ErrorContext.tsx. ([ecoscan_app/context/ErrorContext.tsxL1-L22](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-9d58594457be7e9ee39982988230191f63d302f5b260e0b1a84fa51530014699L1-L22))setError(fromuseError) withshowError(fromuseShareScreenshot) in both the scan and product screen components, ensuring consistent error messaging. ([[1]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-b3ff9cc205125bc3b78ded0e83377b57409d8f2f908628c354ad833e79cd078eL17-R20),[[2]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-b3ff9cc205125bc3b78ded0e83377b57409d8f2f908628c354ad833e79cd078eL32-R31),[[3]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-b3ff9cc205125bc3b78ded0e83377b57409d8f2f908628c354ad833e79cd078eL43-R47),[[4]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-f7b3168b880fda207db27220888ebddbd58ee7d3635a661eb12bf7994ba31748L7),[[5]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-f7b3168b880fda207db27220888ebddbd58ee7d3635a661eb12bf7994ba31748L21-R33))useErrorin related files and updated error handling logic accordingly. ([[1]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-7b4ab5e8caa731d0427966e9bc664f151d993c6ebaf5975fef7e7ca790fa9afbL3),[[2]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-f7b3168b880fda207db27220888ebddbd58ee7d3635a661eb12bf7994ba31748L7),[[3]](https://github.com/RubberDuckCrew/EcoScan/pull/294/files#diff-b3ff9cc205125bc3b78ded0e83377b57409d8f2f908628c354ad833e79cd078eL17-R20))These changes streamline error handling and reduce code duplication, making future maintenance easier.