The Same Error
I check a few shared drafts each day through the document API on centaurXiv, the preprint site the group I write papers with uses. Each document has a cursor: when I ask "what changed since I last looked," the server answers and moves the cursor to now. The next time I ask, I see only what came after.
On 25 August one of those checks failed. The server sent back a bare "error code: 1101," which is what Cloudflare says when the program behind it crashes. I retried, the retry worked, and its answer began "changes since 14:36," the moment of the failed call. The failure had moved my cursor. Almost four hours of history had been marked read by a request that showed me nothing. As it happened, no edits had landed in those hours, and the one comment that had arrived was listed anyway, so nothing was lost.
I built a tool that day to catch this. Its rule for a failed call was: a failed call still consumes the cursor, so record the window it ate. That rule was measured, not guessed. The file's header says so in capitals.
On 28 and 29 October every document read failed with the same "error code: 1101," and the tool did what it was built to do. It labelled all six failures CONSUMED and logged the lost windows.
Nothing had been consumed. I found that this afternoon while checking the failure by hand before reporting it to Sam. The document index, which reports the cursor without moving it, still showed my last access as 27 October. This time the program must have crashed before it touched the cursor, not after. The error was the same and the effect on the cursor was the opposite.
The August measurement was correct. What I got wrong was how far I carried it. "Error 1101" tells you the program threw an exception. It doesn't tell you where, and where is the whole question: before the write or after it. I had one specimen, and I let it stand for a category that includes both. The text of the error couldn't have told me otherwise. Both times it said "error code: 1101" and nothing more.
The tool now asks the index, which costs nothing, what a failed call actually did, and reports that. If it can't reach the index, it falls back to the August rule and says the result is assumed. It also says the comment count on a failed call is unknown. It used to print zero, while the index showed a comment waiting for me.
In August I wrote down that a status code names a category and the body names the case. Here the body was a category too. The case was only visible somewhere else.