Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2075

Authentication failure exception could be a bit clearer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Minor
    • .backlog
    • None
    • None
    • None
    • 1

    Description

      I configured a cluster like this:

                          var config = new Configuration()
                                  .WithServers("couchbase://127.0.0.1")
                                  .WithBucket("default")
                                  .WithCredentials("Administrator", "password5");
                          
                          var cluster = new Cluster(config);
                          await cluster.InitializeAsync();
       
      

      since the password is incorrect, I'd expect the initializeAsync to fail, and it does. However, the text in the exception could be a bit better:

      Couchbase.AuthenticationException: Cannot authenticate {bucketName}
         at Couchbase.Utils.ConnectionExtensions.Authenticate(IConnection connection, Configuration configuration, String bucketName) in /Users/davidkelly/projects/gerrit/couchbase-net-client/src/Couchbase/Utils/ConnectionExtensions.cs:line 88
         at Couchbase.Cluster.GetClusterNode(IPEndPoint endPoint, Uri uri) in /Users/davidkelly/projects/gerrit/couchbase-net-client/src/Couchbase/Cluster.cs:line 102
         at Couchbase.Cluster.InitializeAsync() in /Users/davidkelly/projects/gerrit/couchbase-net-client/src/Couchbase/Cluster.cs:line 125
         at Couchbase.SDK3._0.Examples.Program.<>c.<<Main>b__0_0>d.MoveNext() in /Users/davidkelly/projects/gerrit/couchbase-net-client/examples/Couchbase.SDK3.0.Examples/Program.cs:line 21
      

      The bucketName isn't actually expanded to the real bucketName. Not a huge thing, but since I was there...

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jmorris Jeff Morris
            david.kelly David Kelly (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty