Stream.js (handleParsingError) NodeError instance types are not being buffered in results cell. ERR_OUT_OF_RANGE

Description

I believe the issue is somewhere an error is happening but a new instance of RangeError is not being created for it making it not be caught in the if statement or something else.

The fix I made for it looks like this:
This is the new code:
```js
((e instanceof RangeError) || e.code == 'ERR_OUT_OF_RANGE')
```
Complete function:
```js
Parser.prototype.handleParsingError = function(e, frameInfo, reader, originalOffset, rowIndex) {
if (reader && frameInfo.isStreaming && ((e instanceof RangeError) || e.code == 'ERR_OUT_OF_RANGE')) {
//A controlled error, buffer from offset and move on
return this.bufferResultCell(frameInfo, reader, originalOffset, rowIndex, e.expectedLength);
}

frameInfo.parsingError = true;
frameInfo.cellBuffer = null;
this.push({ header: frameInfo.header, error: e });
};

```

Here is an example error I get, they all fail in different parts inside of the reader function but all stem from `streams.js:325`:

```bash
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 24622. Received 24623
at boundsError (internal/buffer.js:83:9)
at Buffer.readUInt16BE (internal/buffer.js:329:5)
at FrameReader.readShort (/node_modules/cassandra-driver/lib/readers.js:131:29)
at FrameReader.readString (/search/node_modules/cassandra-driver/lib/readers.js:143:25)
at FrameReader.readMetadata (/node_modules/cassandra-driver/lib/readers.js:368:27)
at Parser.Object.<anonymous>.Parser.parseResult (/node_modules/cassandra-driver/lib/streams.js:325:35)
at Parser.Object.<anonymous>.Parser.parseBody (/node_modules/cassandra-driver/lib/streams.js:204:19)
at Parser.Object.<anonymous>.Parser._transform (/node_modules/cassandra-driver/lib/streams.js:156:10)
at Parser.Transform._read (internal/streams/transform.js:205:10)
at Parser.Transform._write (internal/streams/transform.js:193:12) {
code: 'ERR_OUT_OF_RANGE',
coordinator: '127.0.0.1:9042'
query: 'SELECT * FROM people where id = ?'
}
```

Environment

Using Scylla enterprise 4.1

Pull Requests

None

Activity

Show:
thomas yeh
January 6, 2021, 1:17 PM

I got the same issue, but I rollback to the previous version, get the same issue.

My node js version is v10.23.1.

Assignee

Unassigned

Reporter

Jt Whissel

Reviewer

None

Fix versions

None

Labels

None

Components

None

PM Priority

None

Reproduced in

4.6.1

Pull Request

None

Priority

Major