unixctl: Give better error message for unknown commands.
Acked-by: Aaron Conole
@@ -287,7 +287,9 @@ process_command(struct unixctl_conn *conn, struct jsonrpc_msg *request)
params = json_array(request->params);
command = shash_find_data(&commands, request->method);
if (!command) {
- error = xasprintf("\"%s\" is not a valid command", request->method);
+ error = xasprintf("\"%s\" is not a valid command (use "
+ "\"list-commands\" to see a list of valid commands)",
+ request->method);
} else if (params->n < command->min_args) {
error = xasprintf("\"%s\" command requires at least %d arguments",
request->method, command->min_args);
