flair-systems / flair-api-client-py

Python Client for Flair API
Apache License 2.0
15 stars 5 forks source link

Client is throwing `EmptyBodyException` instead of valid empty collection #4

Open shauntarves opened 3 years ago

shauntarves commented 3 years ago

When I try to call a client.get('xxx') on an object I don't have any of - say for example, on vents when I only have pucks - the client is throwing an exception rather than returning a [valid] empty list.

Is this by design or an oversight? This is particularly causing problems in a home assistant plugin that is querying all the known types and assumes an exception is failure.

It's easy to workaround, but perhaps worth rethinking.