kitex-contrib / kitexcall

A command line tool for sending requests using kitex
Apache License 2.0
6 stars 5 forks source link

Proposal: Enhancement of kitexcall‘s warning info for MultiService Support #8

Open Zzhiter opened 1 month ago

Zzhiter commented 1 month ago

When the server is running in MultiService mode, it is necessary to manually specify the IDLServiceName and to designate a transport protocol as TTHeader or TTHeaderFramed. However, there is a gap because users may neglect to specify a compatible transport protocol such as TTHeader or TTHeaderFramed.

The possible error message is as follows:

[ServerError]: RPC call failed: missing method: Method1 in service

But our error message does not provide an appropriate hint to tell the user to manually specify a transport protocol like TTHeader or TTHeaderFramed.

We can add a warning to stderr for cases where the IDLServiceName is specified, and server is in MultiService mode(This may be guessed by error message below, since when user specifiy the IDLServiceName, it is possible that server in not in MultiService mode) but a transport capable of carrying it is not specified, giving users a clear prompt.

Zzhiter commented 1 month ago

To see the demo, try this: https://github.com/a631807682/kitexcall-issue