Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
From the forums: https://forums.couchbase.com/t/the-connection-to-the-cluster-does-not-throw-exceptions-when-the-credentials-are-wrong/29929
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; }
This is confirmed running the code above with invalid credentials or host.