fix: suppress expected missing directory logs

Stops noisy stack traces for missing directory probes
Preserves existing 404 behavior for absent directories
This commit is contained in:
Bohdan Triapitsyn
2026-05-06 01:51:14 +03:00
parent 105443aac2
commit 6a749ed259
+1 -1
View File
@@ -838,7 +838,7 @@ export const registerFsRoutes = (app, dependencies) => {
const err = error;
const code = err && typeof err === 'object' && 'code' in err ? err.code : undefined;
const isPlansPath = code === 'ENOENT' && (isPlansDirectory(resolvedPath) || isPlansDirectory(rawPath));
if (!isPlansPath) {
if (code !== 'ENOENT') {
console.error('Failed to list directory:', error);
}
if (code === 'ENOENT') {