Client prints "Item is deleted" and raises an unhandled exception because 'item' is None. See below:
def get(self, id, expanded=True, include_deleted=False):
if not expanded:
res = self._get_item_with_properties(id)
else:
res = self._get_item_expanded(id) ---> Error within this call
if res is None:
raise ValueError(f"Item with id {id} does not exist")
elif res.deleted and not include_deleted:
print(f"Item with id {id} has been deleted")
return
return res
This MR fixes this issue, however, it is not yet consistent with non-existing item behavior. (See 'raise ValueError' above) We can either choose to return None without error, or raise another 'ValueError' if item is deleted.
Considering your comments, I will change it accordingly.