-
-
Notifications
You must be signed in to change notification settings - Fork 720
fix: suppress verbose error logging for update check timeouts #5745
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: suppress verbose error logging for update check timeouts #5745
Conversation
Add x-promptfoo-silent header to update check API requests to prevent ugly error messages from appearing when network timeouts occur during version checks. These are non-critical operations that should fail silently. Update test expectations to match the new headers parameter.
|
⏩ No test execution environment matched (037bdaa) View output ↗ |
📝 WalkthroughWalkthroughThe change updates two functions in src/updates.ts to include a headers object { 'x-promptfoo-silent': 'true' } in fetchWithTimeout calls for getLatestVersion and getModelAuditLatestVersion. URLs, timeouts, return types, and control flow remain unchanged, including error handling (throw on non-ok for getLatestVersion; return null for getModelAuditLatestVersion). Corresponding tests in test/updates.test.ts are adjusted to expect the headers argument instead of an empty object. No public APIs or exported declarations are modified. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (4)**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/gh-cli-workflow.mdc)
Files:
**/*.{test,spec}.{js,ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/gh-cli-workflow.mdc)
Files:
test/**/*.{test,spec}.ts📄 CodeRabbit inference engine (.cursor/rules/jest.mdc)
Files:
test/**/*.{test.ts,test.tsx,spec.ts,spec.tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (1)src/updates.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (3)
Comment |
Summary
x-promptfoo-silentheader to update check API requests to suppress ugly error loggingTest plan
Before
After
Clean output with no error logging when update checks timeout (as intended).