Skip to content

fix(web): deploy, deploy revoke and deploy list refusals reach the caller - #342

Merged
cvince merged 1 commit into
feat/portabilityfrom
claude/web-refusal-deploy-classes
Aug 28, 2026
Merged

fix(web): deploy, deploy revoke and deploy list refusals reach the caller#342
cvince merged 1 commit into
feat/portabilityfrom
claude/web-refusal-deploy-classes

Conversation

@cvince

@cvince cvince commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Seven guards across the three deploy-family classes. All sit inside an execute() whose catch routes to displayErrorAndExit, so each becomes a coded throw and the existing catch serves the page.

class refusal code
DeployCommand authentication failed AUTH_FAILED
bad --platform value INVALID_FORMAT
DeployRevokeCommand uninitialised project PROJECT_NOT_INITIALIZED
authentication failed AUTH_FAILED
no token with that prefix DEPLOY_TOKEN_NOT_FOUND
DeployListCommand uninitialised project PROJECT_NOT_INITIALIZED
authentication failed AUTH_FAILED

Two deliberately left

Both for the same reason: the message is already on screen before the exit, so converting would print it twice — once by the existing call, once by the error screen.

  • mintOrExitspinner.fail(...) has already rendered the failure
  • ambiguous prefix — a multi-line console.error concatenation

Each needs its existing output folded into the throw, which is an edit with a copy decision in it rather than a mechanical one. Same call as the two role-grant refusals left in inviteCommand.

Suite: 1851 pass, 0 fail.

…ller

Seven guards across the three deploy-family classes. All sit inside an
execute() whose catch routes to displayErrorAndExit, so each becomes a coded
throw and the existing catch serves the page.

  DeployCommand        authentication failed        AUTH_FAILED
                       bad --platform value         INVALID_FORMAT
  DeployRevokeCommand  uninitialised project        PROJECT_NOT_INITIALIZED
                       authentication failed        AUTH_FAILED
                       no token with that prefix    DEPLOY_TOKEN_NOT_FOUND
  DeployListCommand    uninitialised project        PROJECT_NOT_INITIALIZED
                       authentication failed        AUTH_FAILED

TWO ARE DELIBERATELY LEFT, both for the same reason: the message is already on
screen before the exit, so converting them would print it twice — once by the
existing call and once by the error screen.

  mintOrExit           `spinner.fail(...)` has already rendered the failure
  ambiguous prefix     a multi-line `console.error` concatenation

Each needs its existing output folded into the throw, which is an edit with a
copy decision in it rather than a mechanical one. Same call as the two
role-grant refusals left in inviteCommand.

Suite: 1851 pass, 0 fail.
@cvince
cvince merged commit c0f38f0 into feat/portability Aug 28, 2026
2 checks passed
@cvince
cvince deleted the claude/web-refusal-deploy-classes branch August 28, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant