MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / handleFileSystemError

Function handleFileSystemError

source code/utils/settings/settings.ts:159–172  ·  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

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

Callers 2

rawSettingsContainsKeyFunction · 0.85

Calls 2

logForDebuggingFunction · 0.85
logErrorFunction · 0.50

Tested by

no test coverage detected