particle-api-js icon indicating copy to clipboard operation
particle-api-js copied to clipboard

addDeviceToProduct doesn't appear to reject on error?

Open dmiddlecamp opened this issue 8 years ago • 1 comments

observed behavior: added a device of non-matching platform to a product, no error, resolves normally.

expected behavior: addDeviceToProduct rejects with an error, since the API request did not succeed

dmiddlecamp avatar Oct 25 '17 06:10 dmiddlecamp

Hum, since that API endpoint accepts a list of devices to add to a product and it returns 3 arrays, which ones were added, which ones were the wrong platform and which ones were owned by someone else, I'm not sure it make sense to reject. This is better handled by the client.

monkbroc avatar Oct 25 '17 14:10 monkbroc