anax
anax copied to clipboard
Provide more useful error messages when using secretmanager commands on cluster agent
When a user runs any of the hzn secretmanager
CLI commands on a cluster agent, an HTTP error is thrown which does not provide useful information to the user. Since secrets are not supported on cluster agents, these commands should either document their lack of support for cluster agents and/or restrict execution to device agents by checking the type of agent running the command.
$ hzn secretmanager secret list
Error: Failed to authenticate the user with the Exchange. Invocation of GET at https://exchange-api:8080/v1/orgs/myorg/users/admin with failed invoking HTTP request, error: Get "https://exchange-api:8080/v1/orgs/myorg/users/admin": x509: certificate signed by unknown authority