Description
if you run that code:
// var config = new ClientConfiguration()
|
{
|
Servers = new List<Uri> { |
<snip>
|
},
|
|
|
};
|
Cluster cluster = new Cluster(config); |
|
var cred = new ClassicAuthenticator("Administrator","password"); |
//cred.AddBucketCredential("buck", "");
|
//cred.AddBucketCredential("travel-sample", "");
|
|
|
cluster.Authenticate(cred);
|
|
var qr = new QueryRequest().Statement("select * from buck;").Metrics(true); |
var result = cluster.Query<dynamic>(qr);
|
and do not have the "AddBucketCredential" - query will fail with "Sequence has no elements" instead of an exception which is more informative like "Can't issue query, bucket is not authenticate" or something similar.
Link:
https://github.com/couchbase/couchbase-net-client/blob/master/Src/Couchbase/Cluster.cs#L270