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

Adds error message for list_user_permissions missing argument #193

Merged
merged 1 commit into from
Jun 18, 2015

Conversation

videlalvaro
Copy link
Contributor

Fixes #183

@@ -519,6 +519,9 @@ action(list_vhosts, Node, Args, _Opts, Inform, Timeout) ->
display_info_list(call(Node, {rabbit_vhost, info_all, []}, Timeout),
ArgAtoms);

action(list_user_permissions, _Node, _Args = [], _Opts, _Inform, _Timeout) ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps Args = [""] could be caught here as well?

I'm thinking of scripts calling rabbitmqctl list_user_permissions "$user" but $user is not set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't the empty string be a problem with most commands actually? I think for that case we get an error like this:

Listing permissions for user [] ...
Error: no_such_user: 

which at least tells me something about the problem, not like function_clause before

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if we want to handle empty values, it needs to be a separate issue (not sure how many run into that).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, the current error is fine. Disregard my comment.

@michaelklishin michaelklishin self-assigned this Jun 18, 2015
@michaelklishin michaelklishin modified the milestones: 3.5.4, n/a Jun 18, 2015
@michaelklishin michaelklishin merged commit 677bb64 into stable Jun 18, 2015
@dumbbell dumbbell deleted the rabbitmq-server-183 branch January 2, 2018 15:20
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

Successfully merging this pull request may close these issues.

3 participants