You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sfcli -m 1.1.1.1 -u admin --password account list
ERROR:element.cli.cli:list is not a valid module. Please run 'sfcli --help' for a list of valid modules.
This error made me run sfcli --help more than once... Obviously the problem is that I forgot to provide the password, but I got confused (ERROR:element.cli.cli:list looks like some internal string that's not supposed to appear in output; I didn't even realize that list in that string is what I entered above - in my mind was using "account", not "list"). I ended up reading module help pages, looking for spelling mistakes, etc. Of course "list" is not a module, but that's easy to miss [1].
Ideas:
Add a space between ERROR:element.cli.cli: and the invalid module name (that should be enough)
(Optional) Format the "invalid module" error message to look visually similar to "invalid command" (below). Maybe \nUsage: please run 'sfcli --help'?
(Completely optional) In this case (correct module name, missing password) before we throw this "invalid module" error, we could match the provided password against the list of all sfcli modules and then check if the following word is a command name. If the supposed password parameter is a sfcli module and the next word is a command name, then (--password account list) could result in a better error, such as "list is not a valid module or password is likely missing". Maybe this is too much trouble, though.
[1] Compare the visual appearance of wrong command error (vs. wrong module, at the top)
sfcli -m 1.1.1.1 -u admin --password password account getbyids
Usage: sfcli account [OPTIONS] COMMAND [ARGS]...
Error: No such command "getbyids".
The text was updated successfully, but these errors were encountered:
This error made me run
sfcli --help
more than once... Obviously the problem is that I forgot to provide the password, but I got confused (ERROR:element.cli.cli:list
looks like some internal string that's not supposed to appear in output; I didn't even realize thatlist
in that string is what I entered above - in my mind was using "account", not "list"). I ended up reading module help pages, looking for spelling mistakes, etc. Of course "list" is not a module, but that's easy to miss [1].Ideas:
ERROR:element.cli.cli:
and the invalid module name (that should be enough)\nUsage: please run 'sfcli --help'
?--password account list
) could result in a better error, such as "list is not a valid module or password is likely missing". Maybe this is too much trouble, though.[1] Compare the visual appearance of wrong command error (vs. wrong module, at the top)
The text was updated successfully, but these errors were encountered: