MCPcopy
hub / github.com/garrytan/gstack / logErrorContext

Function logErrorContext

lib/gstack-memory-helpers.ts:463–471  ·  view source on GitHub ↗
(entry: ErrorContextEntry)

Source from the content-addressed store, hash-verified

461}
462
463function logErrorContext(entry: ErrorContextEntry): void {
464 try {
465 const path = errorLogPath();
466 mkdirSync(dirname(path), { recursive: true });
467 appendFileSync(path, JSON.stringify(entry) + "\n", "utf-8");
468 } catch {
469 // Logging failure is non-fatal — never block the op.
470 }
471}
472
473// Test-only export for resetting the gitleaks availability cache between tests.
474export function _resetGitleaksAvailabilityCache(): void {

Callers 1

withErrorContextFunction · 0.85

Calls 1

errorLogPathFunction · 0.85

Tested by

no test coverage detected