-
Notifications
You must be signed in to change notification settings - Fork 1.8k
# Pull Request: Fix Silent JSON Parse Errors in combineApiRequests #5494
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
base: main
Are you sure you want to change the base?
Conversation
Changeset version bump
Changeset version bump
| @@ -3,7 +3,7 @@ | |||
| "displayName": "%extension.displayName%", | |||
| "description": "%extension.description%", | |||
| "publisher": "kilocode", | |||
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.
CRITICAL: version field removed from extension manifest
src/package.json is the VS Code extension manifest; omitting version will break packaging/publishing and likely fail Marketplace validation. This looks accidental (the line is removed and replaced by a blank line).
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Fix these issues in Kilo Cloud Overview
Issue Details (click to expand)CRITICAL
WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (2 files)
|
|
π PR Summary
Target Repository:
Kilo-Org/kilocodeBranch:
fix/silent-json-parse-errorsType: π Bug Fix
π― Summary
Fix silent error handling in
combineApiRequeststhat was swallowing JSON parsing errors, making debugging impossible when API request/response data was malformed.π Problem
The
combineApiRequestsfunction insrc/shared/combineApiRequests.tscontained empty catch blocks that silently discarded JSON parsing errors:Impact
β Solution
Added proper warning logging with contextual information while preserving graceful degradation:
Benefits
π Files Changed
src/shared/combineApiRequests.tssrc/shared/__tests__/combineApiRequests.spec.tsπ§ͺ Tests
New Test Cases
should log warning when api_req_started has malformed JSONshould log warning when api_req_finished has malformed JSONshould include timestamp in warning when parsing failsTest Results
All existing tests pass, plus 3 new tests for error logging behavior.
π Checklist
πΈ Example Output
Before (Silent)
After (Visible)
π Changeset
π€ Contributing Notes
This is a straightforward bug fix that improves developer experience without changing any external behavior. The function still returns partial data on parse errors (graceful degradation), but now developers can see when this happens.
Related Issues
This pattern (empty catch blocks) exists in a few other places in the codebase:
src/utils/tts.ts:35src/api/providers/openrouter.ts:808src/services/checkpoints/excludes.ts:196These could be addressed in follow-up PRs.
Submitted by: Community Contributor