Problem: Multiple places in the codebase use .catch(() => {}) to silently discard errors. This hides failures during cleanup operations, JSON parsing, and release-lock calls, making debugging harder when things go wrong. While some of these are deliberate best-effort cleanup (releaseLock after a failure), even those should at minimum log a warning so operators can trace issues.
Evidence:
$ grep -rn "\.catch(() => {})" ./src --include="*.ts" --include="*.tsx" | grep -v node_modules
src/components/issue-card.tsx:159: const data = await res.json().catch(() => ({}));
src/components/issue-card.tsx:213: const data = await res.json().catch(() => ({}));
src/components/issue-card.tsx:266: const data = await res.json().catch(() => ({}));
src/app/login/page.tsx:31: .catch(() => {});
src/app/automation/page.tsx:200: .catch(() => {});
src/app/api/automation/sync/route.ts:27: const body = await request.json().catch(() => ({}));
src/app/api/automation/sync/route.ts:63: await releaseLock(runId).catch(() => {});
src/app/api/sync/route.ts:73: await releaseLock(runId).catch(() => {});
src/app/api/sync/scheduled/route.ts:188: }).catch(() => {});
src/app/api/sync/scheduled/route.ts:190: await releaseLock(runId).catch(() => {});
The production-critical silent swallows:
releaseLock() catch in sync routes — if a lock release fails silently, subsequent sync runs may fail with lock-contention errors and the operator will not know why
request.json().catch(() => ({})) — malformed JSON bodies silently become empty objects, potentially masking API misuse
Acceptance:
Problem: Multiple places in the codebase use
.catch(() => {})to silently discard errors. This hides failures during cleanup operations, JSON parsing, and release-lock calls, making debugging harder when things go wrong. While some of these are deliberate best-effort cleanup (releaseLock after a failure), even those should at minimum log a warning so operators can trace issues.Evidence:
The production-critical silent swallows:
releaseLock()catch in sync routes — if a lock release fails silently, subsequent sync runs may fail with lock-contention errors and the operator will not know whyrequest.json().catch(() => ({}))— malformed JSON bodies silently become empty objects, potentially masking API misuseAcceptance:
.catch(() => {})is replaced with appropriate error handlingreleaseLockafter failure) uses.catch((e) => console.warn("Failed to release lock:", e)).catch((e) => { console.warn("Failed to parse JSON body:", e); return {}; }).catch(() => {})in components at least logs:.catch((e) => console.error("Action failed:", e))