Make the error code be included in the error message.
nieyuyao opened this issue · 0 comments
nieyuyao commented
When an errorCode
is received that is not in the ERROR_CODE
, we will not know the errorCode
through the error stack.
kafka-node/lib/protocol/protocol.js
Lines 926 to 931 in fcc8aef
For example, if received an errorCode
82, new Error(undefined)
will be thrown. Error stack is as follows,
Error
at Object.<anonymous> (/home/appops/approot/server/node_modules/kafka-node/lib/protocol/protocol.js:928:17)
at Object.self.tap (/home/appops/approot/server/node_modules/binary/index.js:248:12)
at Object.decodePartitions (/home/appops/approot/server/node_modules/kafka-node/lib/protocol/protocol.js:926:73)
at Object.self.loop (/home/appops/approot/server/node_modules/binary/index.js:267:16)
at Object.<anonymous> (/home/appops/approot/server/node_modules/kafka-node/lib/protocol/protocol.js:165:8)
at Object.self.loop (/home/appops/approot/server/node_modules/binary/index.js:267:16)
at decodeProduceV1Response (/home/appops/approot/server/node_modules/kafka-node/lib/protocol/protocol.js:920:6)
at KafkaClient.Client.invokeResponseCallback (/home/appops/approot/server/node_modules/kafka-node/lib/baseClient.js:589:18)
at KafkaClient.Client.handleReceivedData (/home/appops/approot/server/node_modules/kafka-node/lib/baseClient.js:569:10)
at KafkaClient.handleReceivedData (/home/appops/approot/server/node_modules/kafka-node/lib/kafkaClient.js:1378:48)
Can make the specific error code be included in the error message?