You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where the callback is either taken from args or from message (if message has type function).
I guess this could be fixed by adding an empty dict to the call in the example scripts (so that the callback becomes the 3rd argument) or, more elegantly, by adding a check for bindings as well as message:
After fixing the connection issue, examples still fail with this error:
TypeError: callback is not a function
Looking at the code for
node-example.js
, execute() is called with:client.execute(script, function(err, res) {
However, the prototype for execute() is:
execute(script, bindings = {}, message = {}, ...args) {
Where the callback is either taken from
args
or frommessage
(ifmessage
has type function).I guess this could be fixed by adding an empty dict to the call in the example scripts (so that the callback becomes the 3rd argument) or, more elegantly, by adding a check for
bindings
as well asmessage
:I'll be happy to submit a PR if that helps.
The text was updated successfully, but these errors were encountered: