Skip to content

Commands that do not take arguments fail with wrong exit code when called with invalid credentials #411

@kangasta

Description

@kangasta

Version

  Version:      3.19.0   
  Build date:   unknown  
  Built with:   go1.24.2 
  System:       darwin   
  Architecture: arm64    

Actual output

$ export UPCLOUD_TOKEN="asd"
$ upctl server list
✗ Command execution failed                                                                                                                       
  Error: error: message="authentication failed using the given username and password", type="AUTHENTICATION_FAILED"

Error: Command execution failed for 1 resource(s)
$ echo $?
1

Expected output

Same as with commands that do take arguments, e.g. server show:

$ export UPCLOUD_TOKEN="asd"
$ upctl server show title
Error: invalid user credentials, authentication failed using the given username and password
$ echo $?
103

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions