Skip to content

fix(version-check): log errors in maybePrefetchPatches catch blocks - #1512

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
fix/version-check-silent-catches
Draft

fix(version-check): log errors in maybePrefetchPatches catch blocks#1512
cursor[bot] wants to merge 1 commit into
mainfrom
fix/version-check-silent-catches

Conversation

@cursor

@cursor cursor Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Bug

maybePrefetchPatches() in src/lib/version-check.ts contained two silent catch blocks that swallowed errors from delta patch pre-fetching and patch cache cleanup without any logging.

Root cause

Both catch blocks used comment-only error suppression (// Pre-fetch is best-effort and /* ignore */) instead of logger.debug(), violating the project's silent-catch prohibition and making failures invisible even with --verbose.

Reproduction

Any error during prefetchNightlyPatches/prefetchStablePatches or cleanupPatchCache would be silently dropped, providing no diagnostic output when delta upgrades fail to pre-fetch.

Fix

  • Added logger.debug() to both catch blocks so errors appear in --verbose output
  • Updated the silent-catch baseline to reflect the fixes
Open in Web View Automation 

The two catch blocks in maybePrefetchPatches silently swallowed errors
from delta patch pre-fetching and patch cache cleanup. While these
operations are best-effort, the silent catches made it impossible to
diagnose failures even with --verbose. Added logger.debug() so errors
are visible in diagnostic output.

Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 31, 2026 12:12pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant