upcloud-cli icon indicating copy to clipboard operation
upcloud-cli copied to clipboard

Suboptimal error message on token delete with invalid credentials

Open scop opened this issue 10 months ago • 1 comments

Environment (required):

  • OS: [e.g. macOS (Darwin or M1), Linux, Windows] Linux
  • Version [e.g. 1.2.0, "upctl version" gives you this] 3.16.1

Describe the bug upctl account token delete THING error message is not as pretty as it c/should when accessed using invalid credentials.

To Reproduce Steps to reproduce the behavior:

  1. Configure invalid credentials
  2. upctl account token delete FOO

Expected behavior

$ upctl account token delete FOO
✗ Command execution failed                                                                                                                                                     
  Error: error: message="Authentication failed using the given username and password.", type="AUTHENTICATION_FAILED"

Observed behavior

$ upctl account token delete FOO
Error: cannot resolve command line arguments: cannot get resolver: error: message="Unauthorized.", type="https://developers.upcloud.com/1.3/errors#ERROR_UNAUTHORIZED", correlation_id=...

Screenshots N/A

Additional context N/A

scop avatar Mar 10 '25 08:03 scop