chore: add available options for perm on error #5814
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds more information on the auth CLI error. My flow to use the auth command was:
This PR suggests the enhancement of the error to:
We can also use
lotus auth api-info --help
, but I think that creates some confusion as commandOptions seem optional. This helps the user to be able to just act instead of trying to figure out what the problem is.I would also like to discuss the usage of the read token. It is not mandatory for the client, are there thoughts about having it required? Otherwise, we could remove the
read
option as it is quite useless at this moment.We could iterate on:
The
api-info
would return all the available tokens for each type of permissions. Let me know your thoughts and I can update this PR or create a follow up