Closed hklages closed 4 years ago
:tada: This issue has been resolved in version 1.12.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
I’ve changed it to throw the error instead of returning the error (my mistake). It now throws and error that the inputted mode is incorrect, with the allowed play modes in the message.
In case of an invalid parameter (e.g. SHFFLE instead of SHUFFLE) the error handling is not straight forward.
Expected Behavior
Your standard example code
console.log('xxxxxxx %j', playmode)
does NOT provide any information. What works is:console.log('xxxxxxxx ' + JSON.stringify(playmode, Object.getOwnPropertyNames(playmode)))
Furthermore, I would expect that errors can be caught with "catch" clause.
Current Behavior
Error (invalid parameter) has to be handled in .then clause and with getOwnPropertyNames.
Possible Solution
Either: provide example see above Or: change return method - maybe return Promise.Reject .... ?
Sample code or executed example
Versions (and Environment)
Node version: node-sonos version: 0.19 OS: debian (raspberry 4)