I was wondering how someone can know if a Bucket-Instance can be used or not. The reason is that I realized that in my local test environment (with one Couchbase-Node) it causes problems when I restart the Couchbase-Server. The Node.js-Application displays then this error after I try to use an existing Bucket-Instance:
CouchbaseError: Generic network failure. Enable detailed error codes (via LCB_CNTL_DETAILED_ERRCODES, or via `detailed_errcodes` in the connection string) and/or enable logging to get more information
Somehow do not find a proper way to test for it. The Bucket-Instance has the property “connected” but that is true and stays true even after I get the error. Getting a proper error does also not work for me. Even if I add “?detailed_errcodes=1” to the connection-string I still just get the above error-message.
I have a method to get a Bucket-Instance before doing any operation. It simply returns an existing one in the case I created one before and the “connected” property is true. Which because of the above problem does not work after a Couchbase-Server restart.
So what is the correct and proper way to do that? Could sadly not find anything. Should not at least the “connected” property change to false after the error so that I can simply check for that, to then create a new Bucket-Instance?