anax icon indicating copy to clipboard operation
anax copied to clipboard

Provide more useful error messages when using secretmanager commands on cluster agent

Open Polber opened this issue 2 years ago • 0 comments

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

Polber avatar Jul 01 '22 18:07 Polber