Closed Raynos closed 9 years ago
+1 on fixing this issue. I'm a beginner of tchannel and I wasted 1+ hour on this error today.
cc @leizha, that is not really a tcurl issue. thriftify should provide better error messages.
@malandrew will look into fixing this;
This is a tcurl issue not a thriftify issue. It's all about tcurl user experience.
Starting on this now.
This issue appears to be resolved. Here's what I get when I try to reproduce it.
known good service and endpoint:
~/dsg/tchannel/node$ tcurl -p 127.0.0.1:21300 autobahn health_v1
'Got call response ok'
'hello from autobahn\n'
endpoint that doesn't exist, but service does:
~/dsg/tchannel/node$ tcurl -p 127.0.0.1:21300 autobahn health_v2
{ [TchannelBadRequestError: no such endpoint service="autobahn" endpoint="health_v2"]
type: 'tchannel.bad-request',
message: 'no such endpoint service="autobahn" endpoint="health_v2"',
isErrorFrame: true,
codeName: 'BadRequest',
errorCode: 6,
originalId: 2,
name: 'TchannelBadRequestError',
fullType: 'tchannel.bad-request' }
no such endpoint service="autobahn" endpoint="health_v2"
service doesn't exist:
~/dsg/tchannel/node$ tcurl -p 127.0.0.1:21300 autobahns health_v1
{ [TchannelDeclinedError: no peer available for request]
type: 'tchannel.declined',
message: 'no peer available for request',
isErrorFrame: true,
codeName: 'Declined',
errorCode: 4,
originalId: 2,
name: 'TchannelDeclinedError',
fullType: 'tchannel.declined' }
no peer available for request
Going to see if maybe this error only manifests itself when you specify a thrift file.
@malandrew this is a thrift only thing.
You need to go into thrift mode with -t thriftFile
The JSON code has sensible error messages; this is only a problem for thrift endpoints.
Closed by #33
We should warn users that
health
is an invalid endpoint because it doesnt have a service. TryMyService::health
cc @kriskowal @ShanniLi