Hi.
I have a collection of items.
users are able to save item to favorites (localstorage).
users are able to remove items from favorites (lets call it function delFav(id))
If another user, who owns the item in question (that the user have set as favorite), deletes his item, the user will get a error message when trying to read/view the item.
code
Object {code: "DBSG205", description: "Collection 'items' doesn't contain object with id 52f0b8dbe4b00fc15f845051."}
/codeNow to my question, how can I perform a check when the item is not found in collection, and ask the user if he would also like to remove it from his favorites?
I can not find anywhere what type of response the DB will give me if READ:
Item ID is not found in collection
User has no internet access (will the read service give similar error)
Something else went wrong.
I only want to ask the user, when item id is NOT found in collection (eg, ReadService is invoked, and return error, not found in collection).
I do not want to ask the user to remove from favorites if unable to read for some other reason (missing internet connection or similar).
Any suggestions how to ask user if he would like to call function delFav(id) if not found in collection?
Thanks!
-Tom