masumsoft / express-cassandra

Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.
http://express-cassandra.readthedocs.io
GNU Lesser General Public License v3.0
227 stars 67 forks source link

Uncatched huge exceptions in case Cassandra down #214

Closed safead closed 4 years ago

safead commented 4 years ago

During hi load operations when cassandra got down, we got uncatched:

uncaughtException: Error during update query on DB -> NoHostAvailableError: All host(s) tried for query failed. First host tried, 192.168.58.132:9042: BusyConnectionError: All connections to host 192.168.58.132:9042 are busy, 2048 requests are in-flight on a single connection

with a huge additional log paths. All DB operations are in try {} catch{} blocks, but this error immediately terminates the node process without any possibility to catch it. Please assist

masumsoft commented 4 years ago

All errors are passed to the callback, hence handling errors in callbacks or promise catch block is expected.