fix: resolve Greptile review comments on error handling
- Remove spurious console.error in logger JSON.parse catch (expected control flow) - Remove debug logging from hot PID cleanup loop (approved override) - Replace unsafe `error as Error` casts with instanceof checks in ChromaSync, GeminiAgent, OpenRouterAgent - Wrap non-Error FTS failures with new Error(String()) instead of dropping details Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-5
@@ -154,11 +154,7 @@ class Logger {
|
||||
try {
|
||||
input = JSON.parse(toolInput);
|
||||
} catch (_parseError: unknown) {
|
||||
// [ANTI-PATTERN IGNORED]: Logger cannot log its own failures, using stderr/console as last resort
|
||||
// Input is a raw string (e.g., Bash command), use as-is
|
||||
if (_parseError instanceof Error) {
|
||||
console.error('[logger] JSON parse failed for tool input:', _parseError);
|
||||
}
|
||||
// Input is a raw string (e.g., Bash command), use as-is — JSON.parse failure is expected here
|
||||
input = toolInput;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user