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

Relationships

#2716 serve: model.delete of a missing model replies with message [object Object]

Opened by stack72 · 9/29/2026· Shipped 9/29/2026

Found while working on swamp-club#2674.

Over serve, model.delete for a model that does not exist (by name or by id) replies with an error frame whose message is the literal string [object Object]: code model_delete_failed, message [object Object].

Cause: handleModelDelete (src/serve/handlers/model_handlers.ts) calls modelDeletePreview, which throws the SwampError object returned by notFound(...) (src/libswamp/models/delete.ts, lookup miss) rather than an Error. The handler's catch passes it to sanitizeErrorForClient, which stringifies a plain object as [object Object].

Expected: the same not-found message the other model handlers send, e.g. Model not found: . Either throw an Error carrying the SwampError message from modelDeletePreview, or have the handler unwrap a SwampError before sanitizing.

Repro: swamp serve, then swamp model delete no-such-model --server .

integration/serve_request_characterization_test.ts deliberately does not pin this message for that reason.

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

Shipped

9/29/2026, 7:18:43 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack729/29/2026, 6:05:12 PM

Sign in to post a ripple.