I am experiencing the same issue as this:
https://datastax-oss.atlassian.net/browse/NODEJS-626 I don't have permission to comment on that jira ticket so I'm emailing here. This is causing a critical issue for the project I'm on.
Issue seems to be that the RangeError produced by node is not the same class as the global RangeError. The proposed solution that uses standard code rather than instanceof `|| e.code === 'ERR_OUT_OF_RANGE'` seems to work.
I'm not entirely sure how to reproduce this but it seems to happen when the connection experiences some throttling (thus buffers fill up) and is trying to fetch around a thousand rows or more via client.eachRow or client.stream. When unthrottled, or with fewer rows, or a small fetchSize, the issue disappears.
Would appreciate some advice on how to either work around this (do I just have to run a forked driver?) or whether there will be an official fix in the near future. Thanks