Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-1156

TLS error not thrown in exception for Nodejs SDK

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 4.x
    • None
    • None
    • None
    • 0

    Description

      If we pass non-correct value for disabling TLS in Node SDK, the TLS error is not thrown in exception as we can see in case of Java/Python SDK where this thing is handled 

      Node Js Example Code ( SDK_CONNECT) with wrogn tls value

      const couchbase = require('couchbase');
      const main = async () => {    const auth = couchbase.PasswordAuthenticator.ldapCompatible('6zkANpkrm09GzcmE3P3LYrQTgAE2wBpa', 'JGXWi8EE5!6D9toNI0dfn2TZUu%y3sunX0ZoWqfud20QTv71OoJ5RbU%73OEsAmx');    const cluster = await couchbase.connect('couchbases://cb.serverlessnodecerttest1-pxfhhn.sdk.dev.nonprod-project-avengers.com?tls_verify=incorrect_tls_value', {        authenticator: auth, configProfile: 'wanDevelopment'    });
          const bucket = cluster.bucket('serverlessnodecerttest1-pxfhhn');    const collection = bucket.scope('samples').collection('airline');};
      main(); 

      Output: 

      {
            error: '',
            isSuccessful: false,
            output: '',
            exception: 'node:internal/process/promises:279\n' +
              '            triggerUncaughtException(err, true /* fromPromise */);\n' +
              '            ^\n' +
              '\n' +
              '[UnambiguousTimeoutError: unambiguous timeout] {\n' +
              '  cause: [Error: unambiguous_timeout (14)] { code: 14 },\n' +
              '  context: undefined\n' +
              '}\n',
            compilationError: ''
      } 

      The exception should have something like this 

      <message=incorrect_tls_value is not a valid TLSVerifyMode option. Excepted TLS verify mode to be either of type TLSVerifyMode or str representation of TLSVerifyMode.> 

      Attachments

        Issue Links

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

          Activity

            People

              jared.casey Jared Casey
              abhishek.singh Abhishek Kumar Singh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty