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

Relationships

#2439 Unsupported --server scheme crashes with an uncaught TypeError and stack trace

Opened by stack72 · 9/23/2026· Shipped 9/24/2026

Problem

Passing a --server URL with a scheme other than http, https, ws, or wss (for example ftp://127.0.0.1:59999/) makes remote commands crash with a fatal log line and a full stack trace instead of a user-facing error.

normalizeServerUrl in src/domain/auth/server_url.ts throws a TypeError for unsupported protocols. toWebSocketUrl in src/cli/remote_run.ts wraps it in a UserError, but resolveServerToken reaches FileServerCredentialRepository.get first, which calls normalizeServerUrl unguarded, so the TypeError escapes.

Reproduction

swamp workflow run anything --server 'ftp://127.0.0.1:59999/'

Output: [FTL] error: TypeError: Unsupported protocol: ftp: (expected http:, https:, ws: or wss:), followed by a stack trace through normalizeServerUrl, FileServerCredentialRepository.get, resolveServerToken, resolveServerTokenFromOptions.

Expected

A clean UserError such as the existing one from toWebSocketUrl: Invalid --server URL ... expected ws://host:port (or http://), with no stack trace.

Found while triaging swamp-club#2428.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDTRIAGE+ 5 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/24/2026, 7:22:32 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack729/23/2026, 11:14:13 PM

Sign in to post a ripple.