🥅 app: fingerprint passkey errors by message, drop expected ones#774
🥅 app: fingerprint passkey errors by message, drop expected ones#774cruzdanilo merged 1 commit intomainfrom
Conversation
🦋 Changeset detectedLatest commit: e2620dc 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 |
WalkthroughCentralizes error parsing/classification and fingerprinting for passkey/auth errors, integrates classification into Sentry's beforeSend to drop or fingerprint events, updates callers to use classifiers, and adds a patch changeset metadata file. (50 words) Changes
Sequence Diagram(s)sequenceDiagram
participant App as Application
participant Report as reportError
participant Classify as classifyError / parseError
participant Sentry as Sentry (beforeSend)
App->>Report: reportError(error, hint?)
Report->>Classify: parseError(error)
Classify-->>Report: {code,name,message}
Report->>Classify: classify(parsed)
Classify-->>Report: {expected, fingerprint, flags}
alt expected == true
Report-->>App: return (suppressed)
else
Report->>Sentry: captureException(error, hint?)
Sentry->>Classify: classify(event sources)
Classify-->>Sentry: {expected?, fingerprint?}
alt event expected == true
Sentry-->>Report: drop event
else
alt fingerprint present
Sentry->>Sentry: set event.fingerprint
end
Sentry-->>Report: send event
end
Report-->>App: return
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 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 significantly refactors the application's error reporting and handling mechanisms. By centralizing the classification and fingerprinting of errors, particularly those stemming from passkey and authentication processes, the changes aim to streamline error tracking. This ensures that expected or transient errors are automatically suppressed or grouped, leading to a cleaner and more actionable error reporting stream in Sentry, ultimately improving the efficiency of debugging and issue resolution. Highlights
Changelog
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
This pull request introduces a centralized error classification and fingerprinting mechanism in reportError.ts, which is a great improvement for maintainability and consistency. The changes effectively refactor several parts of the application to use this new utility, simplifying the code by removing duplicated error-handling logic. My review includes a suggestion to refactor the exported helper functions to improve performance by avoiding redundant computations, and a minor style improvement to enhance code conciseness.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #774 +/- ##
==========================================
+ Coverage 68.15% 68.39% +0.23%
==========================================
Files 207 207
Lines 6950 7005 +55
Branches 2167 2189 +22
==========================================
+ Hits 4737 4791 +54
- Misses 2021 2022 +1
Partials 192 192
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:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ce5b6fe31
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bca2b7151
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df7e58df15
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2620dc093
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary by CodeRabbit
Bug Fixes
Refactor