Potential fix for 1 code quality finding - #12
Conversation
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
|
Warning Review limit reached
More reviews will be available in 58 minutes and 57 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ 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 |
Revert the autofix's generic "DNS query failed: ESERVFAIL" text and keep "queryA ESERVFAIL", which mirrors what Node's real dns.resolve4 rejects with. Only the `code` drives fetchResilient's branch; a comment now explains why the literal is intentionally kept faithful to production. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the unit test for fetchResilient() to add explanatory comments around the DNS failure mock, aligning with the code-quality AI finding.
Changes:
- Added a clarifying comment explaining why the mocked
dns.resolve4rejection message is shaped like Node’s real error.
| // Message mirrors Node's real dns.resolve4 rejection ("queryA ESERVFAIL <host>"); | ||
| // only `code` drives fetchResilient's branch, but the realistic text keeps the | ||
| // mock faithful to what production actually sees. | ||
| mockResolve4({ reject: Object.assign(new Error("queryA ESERVFAIL"), { code: "ESERVFAIL" }) }); |
This PR applies 1/1 suggestions from code quality AI findings.