MCPcopy Create free account
hub / github.com/Noumena-Network/code / handleFileSystemError

Function handleFileSystemError

src/utils/settings/settings.ts:162–175  ·  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

160 * @param path The file path that caused the error
161 */
162function handleFileSystemError(error: unknown, path: string): void {
163 if (
164 typeof error === 'object' &&
165 error &&
166 'code' in error &&
167 error.code === 'ENOENT'
168 ) {
169 logForDebugging(
170 `Broken symlink or missing file encountered for settings.json at path: ${path}`,
171 )
172 } else {
173 logError(error)
174 }
175}
176
177/**
178 * 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