-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow handled errors to be processed #2059
fix: allow handled errors to be processed #2059
Conversation
📝 WalkthroughWalkthroughThis PR modifies the error handling logic in the analytics-js package. The test case for the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ErrorHandler
participant HTTPClient as DefaultHttpClient
participant Console
Client->>ErrorHandler: Trigger error
ErrorHandler-->>ErrorHandler: Evaluate error type and origin
alt Error qualifies for reporting (including handled exceptions)
ErrorHandler->>HTTPClient: Call getAsyncData() to report error
ErrorHandler->>Console: Log error details
else Error should be ignored
ErrorHandler-->>Client: Discard error
end
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)packages/analytics-js/src/services/ErrorHandler/ErrorHandler.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (3)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## hotfix/unsuppress-npm-errors #2059 +/- ##
=============================================================
Coverage 61.41% 61.42%
=============================================================
Files 478 478
Lines 16404 16405 +1
Branches 3232 3235 +3
=============================================================
+ Hits 10075 10076 +1
+ Misses 5122 5113 -9
- Partials 1207 1216 +9 ☔ View full report in Codecov by Sentry. |
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
size-limit report 📦
|
PR Description
I've allowed handled errors to be processed even if they do not seem to be originated from the SDK. Especially, this is helpful for reporting and logging handled errors from the core SDK in the case of NPM installations.
Linear task (optional)
https://linear.app/rudderstack/issue/SDK-3011/unsuppress-handled-errors-for-npm-installations
Cross Browser Tests
Please confirm you have tested for the following browsers:
Sanity Suite
Security
Summary by CodeRabbit