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

Relationships

#3624 swamp CLI: revokeCollectiveToken should tell an unknown token from an unknown collective once swamp-club answers 404

Opened by stack72 · 10/19/2026· Shipped 10/19/2026

Follow-up to lab #2564.

swamp-club now answers PATCH and DELETE /api/v1/collectives/<c>/api-tokens/<id> as its API spec documents:

  • 404 {"error":"Token not found"} for an unknown token, including a token that belongs to another collective
  • 404 {"error":"Not found"} for an unknown collective
  • 403 for a session below owner or admin

Before this change, an unknown token got 422 {"error":"Token not found"}.

What the CLI does today

revokeCollectiveToken treats any 404 as "token not found":

  • an unknown token used to fall through to the generic Failed to revoke collective token (HTTP 422): ... message, and will now show the CLI's 404 message
  • an unknown collective is still misreported as Token \"x\" not found in collective \"...\"

Suggested fix

On a 404, read the body:

  • Token not found means an unknown token
  • Not found means an unknown collective, which should be reported as such

Treat any remaining 422 as a validation error.

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

Shipped

10/19/2026, 7:50:37 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/19/2026, 7:43:25 PM
Editable. Press Enter to edit.

stack72 commented 10/19/2026, 6:47:25 PM

Opened by mistake. This work is tracked on lab #2564.

stack72 commented 10/19/2026, 6:53:11 PM

Reopening: closing this was a mistake. The fix is in progress on branch 2564-collective-token-404, alongside the swamp-club side in lab #2564.

Sign in to post a ripple.