This is something I’ve noticed as well (@rosano it was in one of my many convoluted emails) and it was happening on my own hosted storage instance, not 5apps. I’ve been bashing my head against it for a bit but, I haven’t really dug into the client-side code around this just yet. If I’m understanding the problem… I think it might be a server-side issue.
It appears that occasionally the etags get out of sync. This is what the server uses to check versioning on the document when you attempt an update. When it doesn’t match, the server returns a 412.
EDIT: THIS IS ALL WRONG AND WAS JUST SPECULATION ON MY PART. PLEASE SEE Status 412 when storeObject() quickly repeated - #12 by raucao BELOW. JUST LEAVING THIS FOR POSTERITY.
5apps, I believe, uses an s3 backend for data storage. So it’s entirely possible that we’re hitting a stale metadata read. Essentially we write the data to s3, but when we attempt to read it immediately after we get old information. This is just because it takes a while to replicate the data across s3, so you may just hit a stale object.
Increasing the timeout would potentially help, since you’re giving more time between read/write commands to the server.