Improving CLI error messages #3143
Replies: 7 comments 2 replies
-
There can be multiple listener on one node. This works:
|
Beta Was this translation helpful? Give feedback.
-
Listing tcp-listener subcommands would be great 👍 if we can get clap to do that. |
Beta Was this translation helpful? Give feedback.
-
That would be great maybe also an example value |
Beta Was this translation helpful? Give feedback.
-
👍 agreed, we want to support both ipv4 & ipv6 values. |
Beta Was this translation helpful? Give feedback.
-
Agreed.
I think each command should come with a set of full use examples. For instance creating a TCP listener should show how to create a node and then how to create a listener in that node in a series of commands. This EXAMPLES section can be added to a command's help inserting it just before the LEARN MORE section in the HELP_TEMPLATE. We can modify it just before giving it to clap here. |
Beta Was this translation helpful? Give feedback.
-
Agree. Not sure what the error you encountered was. |
Beta Was this translation helpful? Give feedback.
-
@anuvratsingh all very good points. Feel free to create new issues for these. If you don't get a chance, I'll create some in my morning. |
Beta Was this translation helpful? Give feedback.
-
Current Behaviour
ockam tcp-listener apple
✔ockam tcp-listener create
✔ockam tcp-listener create ip4apple
❌ockam tcp-listener create "11:11:11"
❌ockam tcp-listener create "127.0.0.1:7001"
❌ockam tcp-listener create "127.0.0.1:7001" --node
✔./ockam tcp-listener create "127.0.0.1:7001" --node badnode
❌ockam tcp-listener create "127.0.0.1:7001" --node nodewthlistener
❌ockam tcp-listener create "127.0.0.1:7001" --node nodewithoutlistener
✔## Suggested Behaviour
[NOTE]: I'm really new to the repo, so my understanding and solution can both be wrong.
<BIND> : IPv4:PORT
std::net::Ipv4Addr::parse()
in case of ipv4) and they are probably here because of refactoring.@mrinalwadhwa can you please further elaborate this:
Beta Was this translation helpful? Give feedback.
All reactions