diff --git a/lib/protocol/protocol.js b/lib/protocol/protocol.js index c86cb7e9..427a0b3e 100644 --- a/lib/protocol/protocol.js +++ b/lib/protocol/protocol.js @@ -262,7 +262,7 @@ function _decodeFetchResponse (resp, cb, maxTickMessages, version) { const topic = vars.topic; const partition = vars.partition; - if (errorCode !== 0) { + if (errorCode && errorCode !== 0) { return events.push((next) => { const err = new Error(ERROR_CODE[errorCode]); err.topic = topic;