MCPcopy
hub / github.com/claude-code-best/claude-code / handleFileSystemError

Function handleFileSystemError

src/utils/settings/settings.ts:157–170  ·  view source on GitHub ↗

* Handles file system errors appropriately * @param error The error to handle * @param path The file path that caused the error

(error: unknown, path: string)

Source from the content-addressed store, hash-verified

155 * @param path The file path that caused the error
156 */
157function handleFileSystemError(error: unknown, path: string): void {
158 if (
159 typeof error === 'object' &&
160 error &&
161 'code' in error &&
162 error.code === 'ENOENT'
163 ) {
164 logForDebugging(
165 `Broken symlink or missing file encountered for settings.json at path: ${path}`,
166 )
167 } else {
168 logError(error)
169 }
170}
171
172/**
173 * Parses a settings file into a structured format

Callers 2

rawSettingsContainsKeyFunction · 0.85

Calls 2

logForDebuggingFunction · 0.50
logErrorFunction · 0.50

Tested by

no test coverage detected