-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Hi,
I just came to notice that the current implementation of the ThriftSerializer.encodeBody() will swallow any exceptions thrown by the validation of the thrift response and only print the exception stack trace:
tchannel-java/tchannel-core/src/main/java/com/uber/tchannel/messages/ThriftSerializer.java
Lines 88 to 97 in 5f18d06
| public ByteBuf encodeBody(Object body) { | |
| try { | |
| TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory()); | |
| byte[] payloadBytes = serializer.serialize((TBase) body); | |
| return Unpooled.wrappedBuffer(payloadBytes); | |
| } catch (TException e) { | |
| e.printStackTrace(); | |
| } | |
| return null; | |
| } |
I'd rather prefer to have these exceptions handled by the callee, if problem with serialization awareness is needed by the lib clients, however i'm not sure if this behaviour is somehow implied by how tchannel should function
p.s. by doing this, the actual tchannel calls would not get answered, since the responses will not get published. This will result in timeouts on the tchannel callers side
thanks
atanas