-
Notifications
You must be signed in to change notification settings - Fork 7
tcurl crashes when receiving non-ok result #32
Comments
@benfleis an empty string is invalid json. The json arg scheme for tchannel requires json in arg2 and arg3. You should send '{}' or 'null' |
Yes, but tchannel can give a lot better of an error. |
Agreed on error handling for such a situation. Perhaps I misunderstood -- is the tchannel/tcurl contract such that all data must be JSON? i.e., can you never send an Ok with no data? |
@benfleis For the interim, TCurl accepts JSON for arg2 and arg3 for JSON and Thrift argschemes, or raw strings for the raw argscheme. It could be taught to use {} Thrift by default (or null if we adjust Thriftifty/ThriftRW to accept null in place of an object with all optional properties). I also have this crazy idea of finishing Argunauts to make it a little more natural to express JSON as command line arguments. |
I concur with @jwolski. This issue remains open until we provide a better error. |
My client was temporarily hard coded to
resp.sendNotOk()
.When looking at said
as/json.js
code, I don't see why it would be null. I will try a little more debugging, but perhaps somebody over there has more insight into this. (I am also unsure whether it's fundamentally a tchannel problem, or a tcurl problem.)The text was updated successfully, but these errors were encountered: