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
The documentation for the API shows a signature with optional options and callback parameters. The example shows the function invoked with only two parameters, the shadow name and the callback.
However, the options parameter appears to be required if a callback is supplied. If called the way shown in the example, the callback is never called. This can be fixed in the code by checking if the second argument is a function. Or it can be fixed in the documentation by enclosing the final two formal parameters in another square bracket and modifying the example to include an empty hash for the second argument.
The text was updated successfully, but these errors were encountered:
Hi @aztecrex,
Thank you for pointing this out. We will take a call on what the correct fix should be in this case and include it in the next release. Please do let us know if you have any further suggestions. Thank you for using AWS IoT.
The subscribe and publish APIs should not be affected because it invokes the under layer mqtt API directly. The options and callback are independently optional. We will fix the thingShadow.register() API in the future release.
The documentation for the API shows a signature with optional options and callback parameters. The example shows the function invoked with only two parameters, the shadow name and the callback.
However, the options parameter appears to be required if a callback is supplied. If called the way shown in the example, the callback is never called. This can be fixed in the code by checking if the second argument is a function. Or it can be fixed in the documentation by enclosing the final two formal parameters in another square bracket and modifying the example to include an empty hash for the second argument.
The text was updated successfully, but these errors were encountered: