Request for sharper error messages when invalid thrift calls are made
A mistake I make every now and then is to either (1) supply the incorrect Service identifier to a create_pool command or (2) supply the incorrect Service identifier when I instantiate a thrift server. The resulting error messages do not give much insight into the cause of the problem.
Over time I have written a long checklist of possible causes of problems that I can work through to find the cause of the error. Still, someone in this position would suffer less loss-of-momentum if the error messages were more descriptive. This ticket is a request to improve error handling.
In a situation just now, I incorrectly instantiated the thrift server, by supplying the wrong Service as an argument to aiothrift.create_server. For this situation, the stack trace given on the client side is helpful, because it allows me to see which call is not being dealt with correctly.
The logging on the incorrectly setup-up server side is unhelpful,
{path}/venv/lib/python3.7/site-packages/aiothrift/protocol.py:466: RuntimeWarning: coroutine 'skip' was never awaited
skip(self.trans, ttype)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
File "{path}{/venv/lib/python3.7/site-packages/aiothrift/server.py", line 31, in __call__
await self.processor.process(iproto, oproto)
File "{path}/venv/lib/python3.7/site-packages/aiothrift/processor.py", line 68, in process
api, seqid, result, call = await self.process_in(iprot)
File "{path}/venv/lib/python3.7/site-packages/aiothrift/processor.py", line 16, in process_in
await iprot.skip(TType.STRUCT)
TypeError: object NoneType can't be used in 'await' expression
Could the client side check for a None situation, and give an error message instead of this stack trace above? As an example of the error message, "There is no exposed method {blah} on service interface {name of incorrectly instantiated Service}"?
Thanks. Can you provide a full code example to reproduce this error?