Specifying scan consistency on query causes a unhandled rejection.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

Brett Lawson February 10, 2020 at 9:15 PM

I'm going to resolve this for now on the basis that adding these checks would not really improve the user experience (they would get an equally confusing error such as "callback must be a parameter"). In reality, this comes down to the user not actually looking at the API to see what should be passed, and seems likely to be simply a migration issue.

Michael Reiche January 31, 2020 at 6:28 PM

The code for 'callback' makes it easy for users to end up with this  bizarre 'callback is not a function'.

If the caller passes more than three args, the third arg is used as the 'callback'.  Checking for the correct number of args would help.  Also checking that the third arg is actually a function before assuming it is a 'callback'.   

async query(query, options, callback) {
if (options instanceof Function) {
callback = arguments[1];
options = undefined;
}

Won't Do
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created January 31, 2020 at 5:46 PM
Updated April 24, 2020 at 8:53 PM
Resolved February 10, 2020 at 9:15 PM
Instabug