fix(version-check): log errors in maybePrefetchPatches catch blocks - #1512
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(version-check): log errors in maybePrefetchPatches catch blocks#1512cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
maybePrefetchPatches()insrc/lib/version-check.tscontained 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-effortand/* ignore */) instead oflogger.debug(), violating the project's silent-catch prohibition and making failures invisible even with--verbose.Reproduction
Any error during
prefetchNightlyPatches/prefetchStablePatchesorcleanupPatchCachewould be silently dropped, providing no diagnostic output when delta upgrades fail to pre-fetch.Fix
logger.debug()to both catch blocks so errors appear in--verboseoutput