You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking on Add Mock Ratings shows 400 error responses
Response: { "error": { "code": 400, "message": "the stored version (1531347069149658) does not match the required base version (1531346493121653)", "status": "FAILED_PRECONDITION" } }
Image:
Steps to reproduce:
Complete codelab
Click on a restaurant
Click on Mock Review
EDIT: It only happens when more than 1 review is mocked
The text was updated successfully, but these errors were encountered:
What you are experiencing here is how Transactions work in Firestore: one of the transactions failed to write because the data has changed in the mean time, in this case Firestore re-runs the transaction again, until it succeeds. In the case of multiple Reviews being written at the same time some of them might need to be ran again after the first transaction because the data has changed. This is expected behavior and these errors should be taken more as warnings.
@nicolasgarnier is there a way to catch the error and handle it silently, instead of always printing it to the console?
I tried using .catch on the promise, and wrapping everything into a try-catch, but it still always prints the 400 error to the console.
Error:
Clicking on Add Mock Ratings shows 400 error responses
Response:
{ "error": { "code": 400, "message": "the stored version (1531347069149658) does not match the required base version (1531346493121653)", "status": "FAILED_PRECONDITION" } }
Image:
Steps to reproduce:
EDIT: It only happens when more than 1 review is mocked
The text was updated successfully, but these errors were encountered: