MCPcopy Index your code
hub / github.com/Noumena-Network/code / handleMemoryFileReadError

Function handleMemoryFileReadError

src/utils/claudemd.ts:408–422  ·  view source on GitHub ↗
(error: unknown, filePath: string)

Source from the content-addressed store, hash-verified

406}
407
408function handleMemoryFileReadError(error: unknown, filePath: string): void {
409 const code = getErrnoCode(error)
410 // ENOENT = file doesn't exist, EISDIR = is a directory — both expected
411 if (code === 'ENOENT' || code === 'EISDIR') {
412 return
413 }
414 // Log permission errors (EACCES) as they're actionable
415 if (code === 'EACCES') {
416 // Don't log the full file path to avoid PII/security issues
417 logEvent('ncode_project_memory_permission_error', {
418 is_access_error: 1,
419 has_home_dir: filePath.includes(getClaudeConfigHomeDir()) ? 1 : 0,
420 })
421 }
422}
423
424/**
425 * Used by processMemoryFile → getMemoryFiles so the event loop stays

Callers 1

Calls 2

getErrnoCodeFunction · 0.85
logEventFunction · 0.50

Tested by

no test coverage detected