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:
@@ -326,11 +326,9 @@ export async function waitForProcessesExit(pids: number[], timeoutMs: number): P
|
||||
try {
|
||||
process.kill(pid, 0);
|
||||
return true;
|
||||
} catch (error: unknown) {
|
||||
} catch {
|
||||
// process.kill(pid, 0) throws when PID doesn't exist — expected during cleanup
|
||||
if (error instanceof Error) {
|
||||
logger.debug('SYSTEM', `Process ${pid} no longer exists`, { pid, error: error.message });
|
||||
}
|
||||
// [ANTI-PATTERN IGNORED]: Tight loop checking 100s of PIDs every 100ms during cleanup
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user