[
https://issues.apache.org/jira/browse/THRIFT-3990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James E. King III updated THRIFT-3990:
--------------------------------------
Priority: Major (was: Critical)
> [node.js] Exception swallowed by deserialization function
> ---------------------------------------------------------
>
> Key: THRIFT-3990
> URL: https://issues.apache.org/jira/browse/THRIFT-3990
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Compiler
> Affects Versions: 0.9.3
> Reporter: Dan
> Priority: Major
>
> As a client with generated node.js idls, when I receive data from a server
> that isn't what the idl expects, then an exception is thrown that is
> swallowed by the connection (it doesn't even get emitted and handled by the
> connection object). This causes the client's process to crash and clients
> upstream to hang as a result. What is desired is to catch this exception and
> return it in the callback as an error so that the client can handle the
> exception. Examples to come.
> Example stacktrace:
> ```
> Error: Invalid type: -128
> at TBinaryProtocol.skip
> (.../node_modules/thrift/lib/nodejs/lib/thrift/binary_protocol.js:354:13)
> at Object.Bill.read
> (.../thrift/fn_data_access/gen-nodejs/bills_types.js:1682:15)
> at Object.FetchBillsResult.read
> (.../thrift/fn_data_access/gen-nodejs/bills_types.js:2024:18)
> at Object.BillsDataAccess_fetchBills_result.read
> (.../thrift/fn_data_access/gen-nodejs/BillsDataAccess.js:534:22)
> at Object.BillsDataAccessClient.recv_fetchBills
> (.../thrift/fn_data_access/gen-nodejs/BillsDataAccess.js:714:10)
> at decodeCallback
> (.../node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js:146:41)
> at
> .../node_modules/thrift/lib/nodejs/lib/thrift/buffered_transport.js:48:5
> at IncomingMessage.<anonymous>
> (.../node_modules/thrift/lib/nodejs/lib/thrift/http_connection.js:198:46)
> at emitNone (events.js:91:20)
> at IncomingMessage.emit (events.js:185:7)
> at endReadableNT (_stream_readable.js:974:12)
> at _combinedTickCallback (internal/process/next_tick.js:74:11)
> at process._tickDomainCallback (internal/process/next_tick.js:122:9)
> ```
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)