Stop reporting transient RevenueCat network errors to Sentry#87
Conversation
RC login (Purchases.logIn) and offerings (Purchases.getOfferings) both report to Sentry unconditionally on failure, including transient device-side network/DNS blips that aren't actionable app bugs. Filter those out by RC's own error code instead of message-string matching, and preserve visibility via PostHog instead of paging Sentry. Fixes MAPVAULT-G Fixes MAPVAULT-H Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 1 minute 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)
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
Sentry issues MAPVAULT-G and MAPVAULT-H turned out to be the same root cause surfacing at two call sites in
hooks/use-revenuecat.ts: transient client-side network/DNS failures duringPurchases.logIn()andPurchases.getOfferings()being unconditionally reported to Sentry as errors, even though they're device connectivity blips, not app bugs.isRevenueCatNetworkError()helper (lib/revenuecat.ts) that checks RC's ownPURCHASES_ERROR_CODE.NETWORK_ERROR/OFFLINE_CONNECTION_ERRORcodes, rather than string-matching the error message.revenuecat_login,rc_offerings) now skip Sentry for network errors, while preserving visibility via PostHog (revenuecat_login_network_errorevent;paywall_offerings_load_failedgains a'network'reason).revenuecat_login's remainingSentry.captureExceptionnow attachesextra: { userId }, for parity with the siblingrc_offeringscapture.AnalyticsEventstype anddocs/analytics.mdevent catalog accordingly.Full root-cause writeup and design rationale in the session's plan; reviewed by an independent code-reviewer subagent (verdict: ready to merge, no Critical/Important issues — see PR discussion for follow-up items filed separately).
Fixes MAPVAULT-G
Fixes MAPVAULT-H
Test plan
npm run typecheckpassesnpm run lintpassesnpm run check:i18npasses🤖 Generated with Claude Code