Closed ayomikvn closed 1 year ago
Thank you for making this issue! There was internal discussion on this prior to this issue being made and based on that discussion I made a PR to fix this based on that discussion. The PR directly addresses this issue and was only made thanks to the discussion.
Closing this issue. Thank you so much for letting us know so we could fix this!
Describe the feature
Description
When using the subscribe() method in a JavaScript application (ReactJS), if the method gets a QoS parameter that is of type string, it throws an exception with an empty error message. This makes it difficult to debug the issue.
For instance:
The HTML radio input always returns a value of type string, regardless of what value type you specify. This is the react component I used:
Hence, the code below returns an error with message,
There is something wrong with the subscription: {}
and there is no subscribe event seen in AWS IoT Core's CloudWatch logs:Use Case
I need this for scenarios where I'm developing an application in JavaScript, and not TypeScript.
Proposed Solution
Validate type of the QoS value, before subscribing.
Other Information
No response
Acknowledgements