I need to be able to tell if a set(), delete(), or update() operation on a document has succeeded before I do a transaction operation to increment or decrement a counter.
I've tried to print what set(), delete() and update() return, but it always just returns "seconds" and "nanos" whether or not the operation succeeded or not. I've tried to do operations on document IDs that don't exist, or collections that don't exist, but it always just returns the same thing with no indication if it did anything or not.
collection.("some_col").document("SoM3DoC").delete()
collection.("some_other_col").document("SoM30tH3RDoC").collection("some_col_ref").document("SoM3DoC").delete()
Then, ONLY if the above succeeded (the document existed and was deleted):
some_transaction(transaction, collection.("some_other_col").document("SoM30tH3RDoC")) # decrement a counter in this doc
I'm expecting that the operation methods would either throw an error if it couldn't complete the operation or return some message to indicate it but I can't seem to get any response. I even tried starting with some random collection like collection.("asdfsergreasg").document... but there's still no response.