Good morning,
I’m using Couchbase sdk net client 3.1.3 and couchbase server 6.6.0 and I have a connection problem with the cluster.
Case 1:
I try to connect to the cluster synchronously passing voluntarily IP address, username or password wrong.
In this case no exception is thrown. Instead I would have expected it.
I take the parameters for the connection from a front end mask and then if the user writes them wrong I would like the code to throw an exception
Task<ICluster> cluster = null; try { ClusterOptions options = new ClusterOptions() { UserName = pConfig.user, Password = pConfig.password, ConnectionString = pConfig.server }; cluster = Cluster.ConnectAsync(options); cluster.Wait(); } catch (Exception e) { Log.Error(e.Message); return null; }
Case 2:
In asynchronous mode, the “WaitUntilReadyAsync method (TimeSpan.FromSeconds (10))” throws an exception :
Cluster level WaitUntilReady is only supported by Couchbase Server 6.5 or greater. If you think this exception is caused by another error, please check your SDK logs for detail.
What is the correct way to throw the correct exception when connections parameters are wrong?