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
Attachments
For Gerrit Dashboard: NCBC-1522 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
83528,6 | NCBC-1522: Improve exception handling when auth fails | master | couchbase-net-client | Status: MERGED | +2 | +1 |