timeout option on searchquery causes failure

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     }

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created March 12, 2020 at 6:38 AM
Updated May 7, 2020 at 5:07 PM
Resolved May 7, 2020 at 5:07 PM
Instabug