fix: avoid analytics error banner when tracking is disabled - #549
fix: avoid analytics error banner when tracking is disabled#549pepepeboom wants to merge 1 commit into
Conversation
Use the raw API client for best-effort page-view tracking so expected non-2xx responses do not enter the global error store. Fixes HemmeligOrg#477.
|
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 (1)
📝 WalkthroughWalkthrough
ChangesAnalytics tracking
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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
ESLint install timed out. The project may have too many dependencies for the sandbox. 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
Why
When
HEMMELIG_ANALYTICS_ENABLED=false,POST /api/analytics/trackreturns 403. The normal API client turns that expected response into a user-visible global error, which contradicts the tracker's silent-failure behavior.Using
apiRawpreserves the server-side disable check while preventing the red error banner.Testing
The change is type-preserving because
apiandapiRawuse the same generatedAppTypeclient. Repository CI should validate formatting and build behavior.Fixes #477
Summary by CodeRabbit