If there’s an error when creating a connection (e.g. your username or password are incorrect) you don’t get an error until you actually try and use it, and the one you do get is extremely opaque:
Error: cluster object was closed.
Looking at the source code, it looks like you catch errors which are thrown while creating a connection. This error should be re-thrown (and optionally wrapped) so client code can write out a more sensible error and track down the issue more quickly.