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

timeout option on searchquery causes failure

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.0.2
    • None
    • library
    • None
    • 1

    Description

      (node:38934) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'timeout' of undefined

          at SearchExecutor.query (/Users/michaelreiche/g2/docs-sdk-nodejs/modules/devguide/examples/nodejs/node_modules/couchbase/lib/searchexecutor.js:73:28)

          at Cluster.searchQuery (/Users/michaelreiche/g2/docs-sdk-nodejs/modules/devguide/examples/nodejs/node_modules/couchbase/lib/cluster.js:345:24)

          at searchsimple (/Users/michaelreiche/g2/docs-sdk-nodejs/modules/devguide/examples/nodejs/migrating.js:231:42)

       

      72     if (options.timeout)

      { 73       queryObj.ctl.timeout = options.timeout;  <- should be queryObjCtl = ... 74     }

      75

      76     // Only inject the `ctl` component if there are ctl's.

      77     if (Object.keys(queryObjCtl).length > 0)

      { 78       queryObj.ctl = queryObjCtl; 79     }

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty