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

Function handleMemoryFileReadError

source code/utils/claudemd.ts:404–418  ·  view source on GitHub ↗
(error: unknown, filePath: string)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

getErrnoCodeFunction · 0.85
logEventFunction · 0.85

Tested by

no test coverage detected