The following minimal code works fine in a function node when using azure-iothub@1.7.4 but upgrading to 1.7.5 results in the following error:
"TypeError: Callback has to be a Function"
This code is minimal and almost straight out examples provided and does not seem to have this issue outside of node-red.
I am running on the following:
Node-RED version: v0.19.4
Node.js version: v8.11.1
var iothub = global.get('azure-iothub');
var connectionString = 'HostName=myhub.azure-devices.net;SharedAccessKeyName=nodered;SharedAccessKey=xxxx';
var device =
{
deviceId: 'test'
};
var registry = iothub.Registry.fromConnectionString(connectionString);
registry.get(device.deviceId, function(err, deviceInfo, res) {
});