Relationships
#3465 serve: handlers that sanitize an error for the client never log the original, so path-bearing failures are undiagnosable
Opened by zack · 10/14/2026· Shipped 10/14/2026
Summary
Serve request handlers pass errors through sanitizeErrorForClient (src/serve/handlers/shared.ts), which replaces any message that contains an absolute path or /.swamp/ with the generic text: An internal error occurred. Almost none of them log the original error first: of the 28 sanitizeErrorForClient call sites in src/serve/handlers/admin_handlers.ts, only the extension reload failure logs it. A failure whose message names a file, which most filesystem, bundling and lock errors do, therefore leaves no trace anywhere: the client gets the generic text and the server log is silent.
Impact
Found while triaging swamp-club#3461: handleExtensionPull returned extension_pull_failed / An internal error occurred, and the real cause (deno bundle failed for /tmp/.../m.ts) was only recoverable by patching the handler and reproducing it. An operator running swamp serve hits the same wall in production.
Expected
When a handler sanitizes an error for the client, the server logs the original message (and type) at warn or error level, so the client-facing text stays safe and the operator can still diagnose the failure.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.