UnhandledPromiseRejectionWarning: Error: LCB_ERR_NETWORK (1048): Generic network failure
Is there a way to handle this error that I get if a connection to Couchbase cannot be made? Say the password is wrong, or the Couchbase server is down, when the Node.js app starts up, I see these types of warnings. It would be really great to be able to catch those errors and display a more user friendly message. But everything that I try to do to catch this unhandled rejection warning fails to do so.
The connection is started in a promise (new Cluster), but I can’t figure out how to determine if the connection fails in order to call reject in that promise. The promise always resolves, but never rejects. Then, after the app has started I see the UnhandledPromiseRejectionWarning. This is with Couchbase package 3.0.0.