🥅 app: report expected errors as sentry warnings#801
Conversation
🦋 Changeset detectedLatest commit: b6afa4e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughRefactors error handling to report expected errors as Sentry warnings instead of dropping them. Introduces a new Changes
Sequence DiagramsequenceDiagram
participant App as App (Error Handler)
participant Classify as Error Classifier
participant QC as QueryClient
participant Action as Action Evaluator
participant Sentry as Sentry
App->>Classify: parseError(error)
Classify-->>App: {known, fingerprint, ...}
App->>QC: onError handler triggered
QC->>Action: action(error)
alt action returns "drop"
Action-->>QC: "drop"
QC->>QC: skipError via dropError meta
else action returns "warn"
Action-->>QC: "warn"
QC->>Sentry: report with level: warning
else action returns undefined
Action-->>QC: undefined
QC->>Sentry: report with default level
end
Sentry->>Sentry: capture with fingerprint
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary of ChangesHello @cruzdanilo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the application's error reporting strategy by changing how "expected" errors are handled. Previously, these errors were often suppressed or ignored in Sentry. Now, they are explicitly reported as warnings, providing better visibility into common, non-critical issues without escalating them to critical error alerts. This change helps maintain a clearer picture of application health and user experience. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request effectively implements the change to report expected errors as Sentry warnings instead of suppressing them entirely. The reportError utility function has been refactored to correctly classify errors and set the Sentry event level to 'warning' when an error is expected. The modifications in _layout.tsx, queryClient.ts, and useAuth.ts consistently apply this new error handling strategy. The changes are well-implemented and align with the stated goal of the pull request.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #801 +/- ##
==========================================
- Coverage 69.76% 69.34% -0.42%
==========================================
Files 208 208
Lines 7471 7096 -375
Branches 2394 2264 -130
==========================================
- Hits 5212 4921 -291
+ Misses 2043 1991 -52
+ Partials 216 184 -32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit