Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeszack

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.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 8 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/14/2026, 9:18:18 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack10/14/2026, 6:36:28 PM

Sign in to post a ripple.