up
up copied to clipboard
Improve messaging when a user is not logged in
What problem are you facing?
When a user is not logged in and runs up commands the error returned is no default profile specified
$ up ctp list
Usage: up controlplane list
List control planes for the account.
Flags:
-h, --help Show context-sensitive help.
-v, --version Print version and exit.
--endpoint=https://api.upbound.io Endpoint used for Upbound API ($UP_ENDPOINT).
--profile=STRING Profile used to execute command ($UP_PROFILE).
-a, --account=STRING Account used to execute command ($UP_ACCOUNT).
up: error: no default profile specified
The problem is the documentation indicates the profile is auto generated when you login. If you foolishly think you are logged in (for example, changing linux users after login) this gives you no indication of what your problem is.
How could Upbound help solve your problem?
When no profile is specified, as indicated by the error, either check if the user is logged in or expand the error message to suggest that maybe they aren't logged in.