diff --git a/lib/transport/binary/protocol19/operation.js b/lib/transport/binary/protocol19/operation.js index 33a74e5..c109040 100644 --- a/lib/transport/binary/protocol19/operation.js +++ b/lib/transport/binary/protocol19/operation.js @@ -821,12 +821,16 @@ Operation.prototype.parseError = function (buffer, offset, context, fieldName, r var prev; if (data.hasMore) { prev = new errors.Request(); + prev.type = data.type; + prev.message = data.message; err.previous.push(prev); this.stack.pop(); this.stack.push(prev); readItem.call(this); } else { + err.type = data.type; + err.message = data.message; this.readBytes('javaStackTrace', function (data) { this.readOps.push(function (data) { this.stack.pop(); diff --git a/lib/transport/binary/protocol26/operation.js b/lib/transport/binary/protocol26/operation.js index 33a74e5..c109040 100644 --- a/lib/transport/binary/protocol26/operation.js +++ b/lib/transport/binary/protocol26/operation.js @@ -821,12 +821,16 @@ Operation.prototype.parseError = function (buffer, offset, context, fieldName, r var prev; if (data.hasMore) { prev = new errors.Request(); + prev.type = data.type; + prev.message = data.message; err.previous.push(prev); this.stack.pop(); this.stack.push(prev); readItem.call(this); } else { + err.type = data.type; + err.message = data.message; this.readBytes('javaStackTrace', function (data) { this.readOps.push(function (data) { this.stack.pop(); diff --git a/lib/transport/binary/protocol28/operation.js b/lib/transport/binary/protocol28/operation.js index da9f66a..9a75b4f 100644 --- a/lib/transport/binary/protocol28/operation.js +++ b/lib/transport/binary/protocol28/operation.js @@ -898,12 +898,16 @@ Operation.prototype.parseError = function (buffer, offset, context, fieldName, r var prev; if (data.hasMore) { prev = new errors.Request(); + prev.type = data.type; + prev.message = data.message; err.previous.push(prev); this.stack.pop(); this.stack.push(prev); readItem.call(this); } else { + err.type = data.type; + err.message = data.message; this.readBytes('javaStackTrace', function (data) { this.readOps.push(function (data) { this.stack.pop();