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

Relationships

#4662 An invalid --log-level value fails with a raw TypeError and stack trace instead of a usage error

Opened by zack · 11/11/2026· Shipped 11/11/2026

Running swamp with an unknown log level, for example swamp --log-level bogus (or --log-level help), exits 1 but prints [FTL] error: TypeError: Invalid log level: bogus. followed by eight stack frames from Cliffy and runInvocation in src/cli/mod.ts. The --log-level global option in createRootCommand (src/cli/mod.ts) is declared as level:string, so Cliffy accepts any value and the failure surfaces later from LogTape as an unhandled TypeError. Expected: a validation error naming the option and the accepted levels (trace, debug, info, warning, error, fatal), with no stack trace, in both log and json output modes - for example by declaring the option with an enum type or validating the value before logging is configured.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 6 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/11/2026, 8:05:47 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/11/2026, 7:27:25 PM

Sign in to post a ripple.