-
-
Notifications
You must be signed in to change notification settings - Fork 0
dev to main #20
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
dev to main #20
Conversation
|
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. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughThis PR bumps the package version to 0.2.4 and enhances error handling throughout the codebase by introducing telemetry tracking for errors in the main error handler and refining error propagation in the parser to preserve CliError instances rather than wrapping them. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR merges development changes to main, focusing on improving error handling and telemetry tracking. The changes ensure that CliError exceptions are properly propagated and that all error paths are tracked through telemetry.
Changes:
- Enhanced error handling in datasource URL parsing to preserve CliError exceptions
- Added telemetry error tracking for all error paths in the main error handler
- Version bump from 0.2.3 to 0.2.4
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/zmodel-parser.ts | Added check to re-throw CliError instances during datasource URL evaluation, preventing them from being wrapped in a generic error |
| src/index.ts | Added telemetry.trackError() calls for all error handling branches to ensure errors are properly tracked |
| package.json | Version bumped to 0.2.4 reflecting the new release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/index.ts
Outdated
| // ignore | ||
| exitCode = e.exitCode | ||
| } else if (e instanceof CliError) { | ||
| telemetry.trackError(e) |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error is being tracked twice for CliError instances. The trackCli wrapper already tracks errors via trackSpan (line 116 in telemetry.ts), which calls track('proxy:error') in its catch block. This duplicate tracking will result in two error events being sent to telemetry for the same error.
| telemetry.trackError(e) | |
| // telemetry for CliError is already handled by telemetry.trackCli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/index.ts (1)
81-87: Add anelsebranch to ensure the process exits with the proper error code whentelemetry.isTrackingis false.When
telemetry.isTrackingis false and an error occurs, the catch block completes without callingprocess.exit(). Since this is the main CLI entry point, the process will exit naturally with code 0 instead of the error code, masking failures.if (telemetry.isTracking) { // give telemetry a chance to send events before exit setTimeout(() => { process.exit(exitCode) }, 200) + } else { + process.exit(exitCode) }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
package.jsonsrc/index.tssrc/zmodel-parser.ts
🧰 Additional context used
🧬 Code graph analysis (1)
src/zmodel-parser.ts (1)
src/cli-error.ts (1)
CliError(4-4)
🔇 Additional comments (4)
package.json (1)
3-3: LGTM!Version bump to 0.2.4 appropriately accompanies the telemetry and error handling enhancements in this PR.
src/zmodel-parser.ts (1)
135-141: LGTM!This correctly preserves the specific
CliErrormessage (e.g., "Environment variable X is not set") from theenv()helper rather than masking it with the generic evaluation error. This improves debuggability and ensures meaningful error messages reach the telemetry insrc/index.ts.src/index.ts (2)
70-71: LGTM!Telemetry tracking for
CliErroris correctly placed before logging.
73-79: LGTM!Error tracking covers both standard
Errorinstances and non-Error values by wrapping the latter in a newError. This ensures telemetry receives proper error objects in all cases.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Summary by CodeRabbit
New Features
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.