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

get takes just under 2x timeout to report "collection not found"



    • Bug
    • Resolution: Fixed
    • Minor
    • 3.0.6
    • 3.0.0
    • lcb, library
    • None
    • 1


      When a non-existent collection is specified. get() (and other) operations do not immediately return with "collection not found".  timeout is set to 3000 ms.  Get completes in 5959 ms with error (slightly less than 2x timeout) .  Subsequent get() calls with 5000ms timeout complete in around 9658 ms (output not shown, run kv-operations.js and hit localhost:3000/getwithoptions

      Also - I suspect the "UnhandledPromiseRejectionWarning" needs to be addressed based on "promise rejections that are not handled will terminate the Node.js process"

      % node kv2.js

      get: 5959


      CollectionNotFoundError: collection not found

          at _getWrappedErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:835:14)

          at Object.wrapLcbErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:1008:20)

          at /Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/collection.js:218:24 {

        cause: LibcouchbaseError

      { code: 211 }


        context: KeyValueErrorContext {

          status_code: 4,

          opaque: 0,

          cas: CbCas

      { '0': <Buffer 00 00 00 00 00 00 00 00> }


          key: 'airport_77',

          bucket: 'travel-sample',

          collection: '',

          scope: '',

          context: '',

          ref: ''



      =========== get failed with 211


      (node:4228) UnhandledPromiseRejectionWarning: Error: collection not found

          at _getWrappedErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:835:14)

          at Object.wrapLcbErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:1008:20)

          at /Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/collection.js:218:24

      (node:4228) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

      (node:4228) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


      michaelreiche@hqml0612s-mbp examples %



        1. kv2.js
          1 kB
        2. kv-operations.js
          12 kB

        Issue Links

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



              brett19 Brett Lawson
              michael.reiche Michael Reiche
              0 Vote for this issue
              1 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes