Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message if the CSP API Token does not have marketplace access #107

Open
petewall opened this issue Jun 9, 2022 · 0 comments

Comments

@petewall
Copy link
Contributor

petewall commented Jun 9, 2022

If using a CSP API Token that does not have the right scopes or permissions selected when creating the token, it could return:

Field role is required
mkpcli product list --debug --debug-request-payloads
2022/06/09 15:54:20 Request [#0](https://vmware.slack.com/archives/C019E1KUCKH): GET https://gtwstg.market.csp.vmware.com/api/v1/products?managed=true&pagination={%22page%22:1,%22pageSize%22:20}
2022/06/09 15:54:20 Request [#0](https://vmware.slack.com/archives/C019E1KUCKH) Response: 422 Unprocessable Entity
Error: getting the list of products failed: (422) 422 Unprocessable Entity: {"response":{"message":["Field role is required"]}}

We should add better error messaging about token scopes and roles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant