Description
Multiple locations in the codebase use empty catch blocks (} catch {}) that silently swallow errors. This makes debugging failures difficult and can mask real issues in production.
Locations Found
| File |
Line |
Context |
src/pairing/pairing-store.ts |
510 |
} catch {} |
src/pairing/setup-code.ts |
129, 166 |
} catch {} (2 instances) |
src/infra/home-dir.ts |
63 |
} catch {} |
src/infra/brew.ts |
9 |
} catch {} |
src/infra/ports-lsof.ts |
13, 32 |
} catch {} (2 instances) |
Expected Behavior
Errors should be logged at minimum (even at debug level) so failures are traceable during troubleshooting.
Suggested Fix
Replace empty catch blocks with minimal logging:
} catch (err) {
logger.debug("Operation failed:", err);
}
Or if the error is truly expected/ignorable, add an explicit comment explaining why:
} catch {
// Intentionally ignored: file may not exist on first run
}
Impact
- Debugging failures requires adding manual instrumentation
- Silent failures may go unnoticed in production
- Harder to diagnose user-reported issues
Description
Multiple locations in the codebase use empty catch blocks (
} catch {}) that silently swallow errors. This makes debugging failures difficult and can mask real issues in production.Locations Found
src/pairing/pairing-store.ts} catch {}src/pairing/setup-code.ts} catch {}(2 instances)src/infra/home-dir.ts} catch {}src/infra/brew.ts} catch {}src/infra/ports-lsof.ts} catch {}(2 instances)Expected Behavior
Errors should be logged at minimum (even at debug level) so failures are traceable during troubleshooting.
Suggested Fix
Replace empty catch blocks with minimal logging:
Or if the error is truly expected/ignorable, add an explicit comment explaining why:
Impact