node-sonos-discovery icon indicating copy to clipboard operation
node-sonos-discovery copied to clipboard

log an error in applyPreset if room in list cannot be found with tests

Open kshartman opened this issue 1 year ago • 3 comments

log an error in applyPreset if room in list cannot be found. This is
annoying to track down because the result of the map will cause the
returned player array to contain undefined which results in a less
transparent error later on when we try to group it with others. This
error will still occur, but at least the user knows they have a typo
in a preset.  In my case it was bedrooom instead of bedroom. doh.

We could consider filtering the undefineds which would eliminate the
later error(s) so the remaining rooms can still play.  Not unreasonable
if we tell the user there is bad room name and ignore it.

kshartman avatar Mar 28 '23 05:03 kshartman