fix: log statSync failures in findDbPath instead of silently swallowing them#1861
Closed
carlos-alm wants to merge 1 commit into
Closed
Conversation
…ng them The catch block in resolveCustomDbPath (part of the findDbPath flow) caught all fs.statSync errors — including unexpected ones like EACCES or symlink loops — indistinguishably from the expected "path doesn't exist yet" case, leaving no diagnostic trail. Add a debug() call matching this file's existing convention (18 other catch blocks already do this). Fixes #1750 Impact: 1 functions changed, 68 affected
Contributor
Contributor
Codegraph Impact Analysis1 functions changed → 68 callers affected across 40 files
|
Contributor
Author
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
resolveCustomDbPath's catch block silently swallowed allfs.statSyncerrors, unlike every other catch block in this file (18 of them), leaving no diagnostic trail for a genuine unexpected error (EACCES, symlink loop) vs. the expected "not found yet" case.debug(...)call matching the file's existing convention. Behavior unchanged — still falls through to treat the path as not-yet-existing.Closes #1750
Test plan
npm test— full suite green (3490 passed, 0 failed)npm run lint— cleanStacked on #1860 (base branch
fix/issue-1749-connection-busytimeout-regex-dedupe) — only the connection.ts diff is this issue's change.