Data consistency for multiple & connected REST api calls?

Hello all.

Could anyone here help me with the following question (in the context of REST api calls):
e.g. I save a parse object and update the count (which is stored as a separate parse object) in afterSave method. What happens if the saving of the object succeeds but the update of the count fails?
How is data consistency ensured in such cases?

Thanks.

Iā€™d try to ensure an atomic operation by sending a batch request with both operations together and the flag transaction: true

1 Like