linkerd2/pkg/smimetrics
Alex Leong dac5adc767
Improve error handling in alpha stat command (#4141)
More helpful error messages when the `linkerd alpha stat` command fails.  For example, when the user is not authorized:

```
> linkerd alpha stat deploy/web -n emojivoto --as obama@buoyant.io
Error: deployments.metrics.smi-spec.io "web" is forbidden: User "obama@buoyant.io" cannot get resource "deployments" in API group "metrics.smi-spec.io" in the namespace "emojivoto"
```

When an error is encountered on the server:

```
> linkerd alpha stat deploy -n emojivoto
Error: Unauthorized client certificate. Check configuration and try again.
```

Signed-off-by: Alex Leong <alex@buoyant.io>
2020-03-06 11:47:05 -08:00
..
client.go Improve error handling in alpha stat command (#4141) 2020-03-06 11:47:05 -08:00