🥅 app: suppress network failure errors in error reporter#785
Conversation
🦋 Changeset detectedLatest commit: 6f6e24d 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. ✨ 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 enhances the application's error reporting mechanism by explicitly categorizing "Network request failed" messages as expected errors. The primary goal is to prevent the error reporter from logging or alerting on common network interruptions that do not indicate a critical application failure, thereby improving the signal-to-noise ratio of reported errors. 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
|
|
Sentry Issue: EXA-17D |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #785 +/- ##
==========================================
- Coverage 69.50% 68.83% -0.67%
==========================================
Files 207 207
Lines 7202 7012 -190
Branches 2256 2205 -51
==========================================
- Hits 5006 4827 -179
+ Misses 2007 2006 -1
+ Partials 189 179 -10
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:
|
| authPrefixes.some((prefix) => message.startsWith(prefix))); | ||
| const authExpected = passkeyExpected || passkeyNameExpected || message === "invalid operation"; | ||
| const expected = passkeyExpected || message === "invalid operation"; | ||
| const expected = passkeyExpected || message === "invalid operation" || message === "Network request failed"; |
There was a problem hiding this comment.
Bug: Globally suppressing "Network request failed" errors is overly broad and risks hiding critical backend or infrastructure issues from error reporting.
Severity: HIGH
Suggested Fix
Instead of a global suppression in reportError, use the more targeted suppressError function on a per-query basis where this error is expected. Add code comments to explain why the suppression is necessary in those specific contexts. This will prevent masking legitimate, critical backend failures.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/utils/reportError.ts#L106
Potential issue: The change in `reportError.ts` adds a global suppression for any error
with the message "Network request failed". This message is generic and can be triggered
by various causes, including actual server downtime, SSL/TLS certificate problems, or
CORS issues, not just user-side network connectivity problems. By silencing these errors
globally, the application will fail to report critical backend or infrastructure
failures to Sentry, potentially leaving the team unaware of outages affecting core
financial features like card operations, KYC, or DeFi swaps.
Did we get this right? 👍 / 👎 to inform future reviews.
|
Sentry Issue: EXA-1BN |
|
Sentry Issue: EXA-18P |
Uh oh!
There was an error while loading. Please reload this page.